diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0c87fbe --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +cirros* +config_file_backup +release + diff --git a/configure.sh b/configure.sh old mode 100644 new mode 100755 diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index ec10a20..8f982f8 --- a/install.sh +++ b/install.sh @@ -40,17 +40,17 @@ function install-common-packages() { apt-get install chrony -y service chrony restart - echo "About to configure APT for Ocata" - sleep 3 - apt-get install software-properties-common -y - ubuntu_version=`lsb_release -sr` - if [ "$ubuntu_version" == "17.04" ] || [ "$ubuntu_version" == "16.04" ] - then - add-apt-repository cloud-archive:ocata - else - echo "Ocata release supported only on Zesty (17.04) and Xenial (16.04)" - exit 1; - fi + #echo "About to configure APT for Ocata" + #sleep 3 + #apt-get install software-properties-common -y + #ubuntu_version=`lsb_release -sr` + #if [ "$ubuntu_version" == "17.04" ] || [ "$ubuntu_version" == "16.04" ] + #then + # add-apt-repository cloud-archive:ocata + #else + # echo "Ocata release supported only on Zesty (17.04) and Xenial (16.04)" + # exit 1; + #fi echo "Doing full system update" sleep 3 @@ -63,6 +63,14 @@ function install-common-packages() { function install-controller-packages() { echo "Installing MariaDB and MongoDB..." apt-get install mariadb-server python-pymysql -y + ubuntu_version=`lsb_release -sr` + if [ "$ubuntu_version" == "18.04" ] + then + # Change apparmor security settings for mysql to start without errors on Ubuntu 18.04 + echo "/usr/sbin/mysqld { }" | sudo tee /etc/apparmor.d/usr.sbin.mysqld + apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld + service mariadb restart + fi echo "Installing RabbitMQ..." sleep 3 @@ -79,7 +87,8 @@ function install-controller-packages() { echo "Installing Nova for Controller" sleep 2 - apt-get install nova-api nova-cert nova-conductor nova-consoleauth nova-novncproxy \ + # Removed nova-cert package, it's deprecated & not available in Ubuntu 18.04 repository + apt-get install nova-api nova-conductor nova-consoleauth nova-novncproxy \ nova-scheduler nova-placement-api python-novaclient -y install-neutron-packages-controller diff --git a/lib/admin_openrc.sh b/lib/admin_openrc.sh old mode 100644 new mode 100755 index 0776665..e696e74 --- a/lib/admin_openrc.sh +++ b/lib/admin_openrc.sh @@ -19,6 +19,6 @@ export OS_USER_DOMAIN_NAME=default export OS_PROJECT_NAME=admin export OS_USERNAME=admin export OS_PASSWORD=password -export OS_AUTH_URL=http://$final_controller_host_name:35357/v3 +export OS_AUTH_URL=http://$final_controller_host_name:5000/v3 export OS_IDENTITY_API_VERSION=3 export OS_IMAGE_API_VERSION=2 diff --git a/lib/config-parameters.sh b/lib/config-parameters.sh old mode 100644 new mode 100755 index 9f9b495..22b1e42 --- a/lib/config-parameters.sh +++ b/lib/config-parameters.sh @@ -1,8 +1,10 @@ controller_host_name="controller" ### Start - interface related settings -readonly mgmt_interface="enp0s3" -readonly data_interface="enp0s8" +#readonly mgmt_interface="enp0s3" +#readonly data_interface="enp0s8" +readonly mgmt_interface="ens3" +readonly data_interface="ens3" ### End - interface related settings ### Start - Neutron related settings @@ -69,7 +71,7 @@ function configure-keystone-authentication() { echo "Called configure-keystone-authentication with paramters: $@" sleep 3 crudini --set $1 keystone_authtoken auth_uri http://$2:5000 - crudini --set $1 keystone_authtoken auth_url http://$2:35357 + crudini --set $1 keystone_authtoken auth_url http://$2:5000 crudini --set $1 keystone_authtoken memcached_servers $2:11211 crudini --set $1 keystone_authtoken auth_type password crudini --set $1 keystone_authtoken project_domain_name default @@ -112,14 +114,14 @@ function create-api-endpoints() { function get-ip-address() { ip_address_val='' ubuntu_version=`lsb_release -sr` - if [ "$ubuntu_version" == "17.04" ] + if [ "$ubuntu_version" == "18.04" ] || [ "$ubuntu_version" == "17.04" ] then ip_address_val=`ifconfig $1 | grep 'inet ' | cut -d' ' -f10 | awk '{ print $1}'` elif [ "$ubuntu_version" == "16.04" ] then ip_address_val=`ifconfig $1 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` else - echo "This release is supported only on Zesty (17.04) or Xenial (16.04)" + echo "This release is supported only on Bionic (18.04), Zesty (17.04) or Xenial (16.04)" exit 1; fi echo $ip_address_val diff --git a/lib/configure-ceilometer.sh b/lib/configure-ceilometer.sh old mode 100644 new mode 100755 diff --git a/lib/configure-forwarding.sh b/lib/configure-forwarding.sh old mode 100644 new mode 100755 diff --git a/lib/configure-glance.sh b/lib/configure-glance.sh old mode 100644 new mode 100755 diff --git a/lib/configure-heat.sh b/lib/configure-heat.sh old mode 100644 new mode 100755 diff --git a/lib/configure-horizon.sh b/lib/configure-horizon.sh old mode 100644 new mode 100755 index e247ef1..2bda46e --- a/lib/configure-horizon.sh +++ b/lib/configure-horizon.sh @@ -14,7 +14,8 @@ sed -e "/^'LOCATION.*$/s/^.*$/'LOCATION': \'"$1:1121"\'/" -i /etc/openstack-dash grep "OPENSTACK_HOST" /etc/openstack-dashboard/local_settings.py grep "LOCATION" /etc/openstack-dashboard/local_settings.py echo_and_sleep "OCATA - fixing secret_key permission" 1 -chown www-data /var/lib/openstack-dashboard/secret_key +#chown www-data /var/lib/openstack-dashboard/secret_key +chown horizon:horizon /var/lib/openstack-dashboard/secret_key echo_and_sleep "Restarting apache2" 1 service apache2 reload echo_and_sleep "Restarted apache2" 1 diff --git a/lib/configure-keystone.sh b/lib/configure-keystone.sh old mode 100644 new mode 100755 index 42aee9a..cbc2127 --- a/lib/configure-keystone.sh +++ b/lib/configure-keystone.sh @@ -25,8 +25,8 @@ keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone keystone-manage credential_setup --keystone-user keystone --keystone-group keystone keystone-manage bootstrap --bootstrap-password $5 \ - --bootstrap-admin-url http://$4:35357/v3/ \ - --bootstrap-internal-url http://$4:35357/v3/ \ + --bootstrap-admin-url http://$4:5000/v3/ \ + --bootstrap-internal-url http://$4:5000/v3/ \ --bootstrap-public-url http://$4:5000/v3/ \ --bootstrap-region-id RegionOne echo_and_sleep "Executed Keystone Bootstrap" 2 @@ -45,7 +45,7 @@ export OS_PASSWORD=$5 export OS_PROJECT_NAME=admin export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_DOMAIN_NAME=Default -export OS_AUTH_URL=http://$4:35357/v3 +export OS_AUTH_URL=http://$4:5000/v3 export OS_IDENTITY_API_VERSION=3 echo_and_sleep "Set environment variables" 1 diff --git a/lib/configure-neutron.sh b/lib/configure-neutron.sh old mode 100644 new mode 100755 index 476de5b..8262a4e --- a/lib/configure-neutron.sh +++ b/lib/configure-neutron.sh @@ -53,7 +53,7 @@ if [ "$1" == "networknode" -o "$1" == "controller" ] crudini --set /etc/neutron/neutron.conf DEFAULT notify_nova_on_port_data_changes True crudini --set /etc/neutron/neutron.conf DEFAULT nova_url http://$2:8774/v2 - crudini --set /etc/neutron/neutron.conf nova auth_url http://$2:35357/ + crudini --set /etc/neutron/neutron.conf nova auth_url http://$2:5000/ crudini --set /etc/neutron/neutron.conf nova auth_type password crudini --set /etc/neutron/neutron.conf nova project_domain_name default crudini --set /etc/neutron/neutron.conf nova user_domain_name default @@ -129,7 +129,7 @@ sleep 3 if [ "$1" == "compute" -o "$1" == "controller" ] then crudini --set /etc/nova/nova.conf neutron url http://$2:9696 - crudini --set /etc/nova/nova.conf neutron auth_url http://$2:35357 + crudini --set /etc/nova/nova.conf neutron auth_url http://$2:5000 crudini --set /etc/nova/nova.conf neutron auth_type password crudini --set /etc/nova/nova.conf neutron project_domain_name default crudini --set /etc/nova/nova.conf neutron user_domain_name default diff --git a/lib/configure-nova.sh b/lib/configure-nova.sh old mode 100644 new mode 100755 index 86e84f9..fd40826 --- a/lib/configure-nova.sh +++ b/lib/configure-nova.sh @@ -76,7 +76,7 @@ crudini --set /etc/nova/nova.conf placement project_domain_name Default crudini --set /etc/nova/nova.conf placement project_name service crudini --set /etc/nova/nova.conf placement auth_type password crudini --set /etc/nova/nova.conf placement user_domain_name Default -crudini --set /etc/nova/nova.conf placement auth_url http://$2:35357/v3 +crudini --set /etc/nova/nova.conf placement auth_url http://$2:5000/v3 crudini --set /etc/nova/nova.conf placement username placement crudini --set /etc/nova/nova.conf placement password placement diff --git a/lib/configure-ovs-bridge.sh b/lib/configure-ovs-bridge.sh old mode 100644 new mode 100755 diff --git a/lib/configure-packages.sh b/lib/configure-packages.sh old mode 100644 new mode 100755 diff --git a/lib/configure-qemu.sh b/lib/configure-qemu.sh old mode 100644 new mode 100755 diff --git a/lib/install-config-odl-ovs.sh b/lib/install-config-odl-ovs.sh old mode 100644 new mode 100755 diff --git a/lib/install-config-ovs-vxlan.sh b/lib/install-config-ovs-vxlan.sh old mode 100644 new mode 100755 diff --git a/lib/local_settings.py b/lib/local_settings.py old mode 100644 new mode 100755 diff --git a/lib/mysql-secure-installation.sh b/lib/mysql-secure-installation.sh old mode 100644 new mode 100755 diff --git a/lib/setup-cirros-image.sh b/lib/setup-cirros-image.sh old mode 100644 new mode 100755 diff --git a/post-config-actions.sh b/post-config-actions.sh old mode 100644 new mode 100755 diff --git a/remove.sh b/remove.sh old mode 100644 new mode 100755 diff --git a/util/backup-restore-config-files.sh b/util/backup-restore-config-files.sh old mode 100644 new mode 100755 diff --git a/util/debug-openstack-service.sh b/util/debug-openstack-service.sh old mode 100644 new mode 100755 diff --git a/util/detect-nodetype.sh b/util/detect-nodetype.sh old mode 100644 new mode 100755 diff --git a/util/drop-databases.sh b/util/drop-databases.sh old mode 100644 new mode 100755 diff --git a/util/install-config-linux-bridge.sh b/util/install-config-linux-bridge.sh old mode 100644 new mode 100755 diff --git a/util/manage-services.sh b/util/manage-services.sh old mode 100644 new mode 100755 diff --git a/util/update-etc-hosts.sh b/util/update-etc-hosts.sh old mode 100644 new mode 100755 index c799904..de71868 --- a/util/update-etc-hosts.sh +++ b/util/update-etc-hosts.sh @@ -23,14 +23,14 @@ function change-ip-in-etc-hosts() { function get-ip-address() { ip_address_val='' ubuntu_version=`lsb_release -sr` - if [ "$ubuntu_version" == "17.04" ] + if [ "$ubuntu_version" == "18.04" ] || [ "$ubuntu_version" == "17.04" ] then ip_address_val=`ifconfig $1 | grep 'inet ' | cut -d' ' -f10 | awk '{ print $1}'` elif [ "$ubuntu_version" == "16.04" ] then ip_address_val=`ifconfig $1 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` else - echo "This release is supported only on Zesty (17.04) or Xenial (16.04)" + echo "This release is supported only on Bionic (18.04), Zesty (17.04) or Xenial (16.04)" exit 1; fi echo $ip_address_val diff --git a/util/update-etc-network-interfaces.sh b/util/update-etc-network-interfaces.sh old mode 100644 new mode 100755 diff --git a/util/update-ip.sh b/util/update-ip.sh old mode 100644 new mode 100755