progetti:cloud-areapd:ced-c:controller_and_network_nodes
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| progetti:cloud-areapd:ced-c:controller_and_network_nodes [2015/04/20 08:36] – [Configure Glance on primary node] mazzon@infn.it | progetti:cloud-areapd:ced-c:controller_and_network_nodes [2015/09/23 08:45] (current) – [Configure Cinder on primary node] mazzon@infn.it | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ======= Install and configure Controller nodes ====== | ||
| + | Authors: | ||
| + | * Paolo E. Mazzon (DEI) | ||
| + | * Matteo Menguzzato (INFN Padova) | ||
| + | * Gianpietro Sella (DISC) | ||
| + | |||
| + | ===== Reference Links ===== | ||
| + | * [[progetti: | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | * [[progetti: | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | ===== Naming conventions and networking assumptions ===== | ||
| + | We assume that the controller nodes have the following setup: | ||
| + | * They have 1 network interfaces connected to 1 networks: **management network (em1)** | ||
| + | * **Management network** is: '' | ||
| + | * First node is named: '' | ||
| + | * Second node is named: '' | ||
| + | |||
| + | ===== Prerequisites ===== | ||
| + | |||
| + | Two nodes with: | ||
| + | * Updated CentOS7 | ||
| + | * Make sure that yum autoupdate is disabled | ||
| + | <code bash> | ||
| + | [root@cld-blu-03 ~]# grep ENA / | ||
| + | # ENABLED | ||
| + | ENABLED=" | ||
| + | </ | ||
| + | * At least 20GB HD for operating system and OpenStack software and related log files | ||
| + | * Dedicated remote storage mounted on ''/ | ||
| + | * SELinux configured as " | ||
| + | * EPEL 7 repository configured | ||
| + | * A MySQL (possibly a HA cluster) endpoint each OpenStack service can connect to (in this guide we're using our MySQL Percona cluster' | ||
| + | * A HAProxy/ | ||
| + | * In the three nodes running HAProxy and in the controller nodes, the following certificates must be installed with the right permissions: | ||
| + | * service certificate and key: | ||
| + | <code bash> | ||
| + | [root@cld-blu-05 ~]# ll / | ||
| + | total 8 | ||
| + | -rw-r--r-- 1 root root 1476 May 6 16:59 hostcert.pem | ||
| + | -rw------- 1 root root 916 May 6 16:59 hostkey.pem | ||
| + | </ | ||
| + | * CA chain certificate: | ||
| + | <code bash> | ||
| + | [root@cld-blu-03 ~]# ll / | ||
| + | -rw-r--r--. 1 root root 1257 Mar 24 04:17 / | ||
| + | </ | ||
| + | ===== Configure firewalld to allow traffic through relevant TCP ports on both nodes ===== | ||
| + | Execute the following commands on both controller nodes (cld-blu-03 and cld-blu-04): | ||
| + | <code bash> | ||
| + | # allow traffic toward rabbitmq server | ||
| + | firewall-cmd --permanent --add-port=5672/ | ||
| + | firewall-cmd --permanent --add-port=4369/ | ||
| + | firewall-cmd --permanent --add-port=35197/ | ||
| + | firewall-cmd --permanent --add-port=9100-9110/ | ||
| + | # allow traffic toward keystone | ||
| + | firewall-cmd --permanent --add-port=5000/ | ||
| + | # allow traffic to glance-api | ||
| + | firewall-cmd --permanent --add-port=9292/ | ||
| + | # allow traffic to glance-registry | ||
| + | firewall-cmd --permanent --add-port=9191/ | ||
| + | # allow traffic to Nova EC2 API | ||
| + | firewall-cmd --permanent --add-port=8773/ | ||
| + | # allow traffic to Nova API | ||
| + | firewall-cmd --permanent --add-port=8774/ | ||
| + | # allow traffic to Nova Metadata server | ||
| + | firewall-cmd --permanent --add-port=8775/ | ||
| + | # allow traffic to Nova VNC proxy | ||
| + | firewall-cmd --permanent --add-port=6080/ | ||
| + | # allow traffic to Neutron Server | ||
| + | firewall-cmd --permanent --add-port=9696/ | ||
| + | # allow traffic to Dashboard | ||
| + | firewall-cmd --permanent --add-port=80/ | ||
| + | # allow traffic to memcached | ||
| + | firewall-cmd --permanent --add-port=11211/ | ||
| + | # allow traffic to Cinder API | ||
| + | firewall-cmd --permanent --add-port=3260/ | ||
| + | # permit ntpd's udp communications | ||
| + | firewall-cmd --permanent --add-port=123/ | ||
| + | |||
| + | firewall-cmd --reload | ||
| + | |||
| + | </ | ||
| + | |||
| + | **WARNING: '' | ||
| + | It is used here only because: | ||
| + | - we are configuring firewall from scratch. | ||
| + | - rules added with the '' | ||
| + | |||
| + | In the subsequent configurations rules are added by opening ports with the pair | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Also the HAProxy nodes (cld-blu-05, | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | | ||
| + | done << EOF | ||
| + | 5672 | ||
| + | 4369 | ||
| + | 35197 | ||
| + | 9100-9110 | ||
| + | 5000 | ||
| + | 35357 | ||
| + | 9292 | ||
| + | 9191 | ||
| + | 8773 | ||
| + | 8774 | ||
| + | 8775 | ||
| + | 6080 | ||
| + | 8776 | ||
| + | 9696 | ||
| + | 80 | ||
| + | 12111 | ||
| + | 443 | ||
| + | 8080 | ||
| + | 8004 | ||
| + | 8000 | ||
| + | EOF | ||
| + | |||
| + | firewall-cmd --add-port=123/ | ||
| + | firewall-cmd --permanent --add-port=123/ | ||
| + | |||
| + | </ | ||
| + | ===== Configure HAProxy ===== | ||
| + | The HAProxy nodes run the haproxy and keepalived daemons. HAProxy redirects connection from the external world to the controller nodes (users who want to connect to glance/ | ||
| + | |||
| + | This guide will assume (as mentioned above) that HAProxy has been already configured for the MySQL cluster. Only the additional part for OpenStack is shown here. | ||
| + | |||
| + | Log into the HAProxy node(s) and put the following lines in ''/ | ||
| + | <code bash> | ||
| + | |||
| + | global | ||
| + | log 127.0.0.1 | ||
| + | log 127.0.0.1 | ||
| + | maxconn 4096 | ||
| + | uid 188 | ||
| + | gid 188 | ||
| + | daemon | ||
| + | tune.ssl.default-dh-param 4096 | ||
| + | tune.maxrewrite 65536 | ||
| + | tune.bufsize 65536 | ||
| + | |||
| + | defaults | ||
| + | log | ||
| + | mode http | ||
| + | option | ||
| + | option | ||
| + | retries 3 | ||
| + | option | ||
| + | maxconn | ||
| + | timeout | ||
| + | timeout | ||
| + | timeout | ||
| + | timeout | ||
| + | timeout | ||
| + | timeout | ||
| + | |||
| + | |||
| + | listen mysql-cluster-one | ||
| + | bind 192.168.60.180: | ||
| + | mode tcp | ||
| + | balance leastconn | ||
| + | option | ||
| + | default-server on-marked-down shutdown-sessions on-marked-up shutdown-backup-sessions | ||
| + | server | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen mysql-cluster-two | ||
| + | bind 192.168.60.180: | ||
| + | mode tcp | ||
| + | balance leastconn | ||
| + | option | ||
| + | default-server on-marked-down shutdown-sessions on-marked-up shutdown-backup-sessions | ||
| + | server | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen mysql-cluster-three | ||
| + | bind 192.168.60.180: | ||
| + | mode tcp | ||
| + | balance leastconn | ||
| + | option | ||
| + | default-server on-marked-down shutdown-sessions on-marked-up shutdown-backup-sessions | ||
| + | server | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen dashboard_public_ssl | ||
| + | bind 90.147.143.10: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen dashboard_public | ||
| + | bind 90.147.143.10: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen vnc | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen vnc_public | ||
| + | bind 90.147.143.10: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen keystone_auth_public | ||
| + | bind 90.147.143.10: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen keystone_api_public | ||
| + | bind 90.147.143.10: | ||
| + | balance | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen keystone_auth | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen keystone_api | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen glance_api | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen glance_api_public | ||
| + | bind 90.147.143.10: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen glance_registry | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen novaec2-api | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen novaec2-api_public | ||
| + | bind 90.147.143.10: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen nova-api | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen nova-api_public | ||
| + | bind 90.147.143.10: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen nova-metadata | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen nova-metadata_public | ||
| + | bind 90.147.143.10: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen cinder-api_public | ||
| + | bind 90.147.143.10: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen neutron-server | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen neutron-server_public | ||
| + | bind 90.147.143.10: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen rabbitmq-server | ||
| + | bind 192.168.60.180: | ||
| + | balance roundrobin | ||
| + | mode tcp | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen epmd | ||
| + | bind 192.168.60.180: | ||
| + | balance roundrobin | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen memcached_cluster | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | </ | ||
| + | Check the syntax of the file you've just modifed: | ||
| + | <code bash> | ||
| + | [root@cld-blu-05 ~]# haproxy -c -f / | ||
| + | Configuration file is valid | ||
| + | </ | ||
| + | To enable logging of the haproxy traffic allow the rsyslog service on cld-blu-05, cld-blu-06 and cld-blu-07 to accept udp connections from the haproxy daemons. In ''/ | ||
| + | < | ||
| + | # Provides UDP syslog reception | ||
| + | $ModLoad imudp | ||
| + | $UDPServerAddress 127.0.0.1 | ||
| + | $UDPServerRun 514 | ||
| + | </ | ||
| + | Then add the specific haproxy targets by issuing the command: | ||
| + | <code bash> | ||
| + | cat << EOF >> / | ||
| + | # Save haproxy messages also to haproxy.log | ||
| + | local0.*; | ||
| + | EOF | ||
| + | </ | ||
| + | Setup logrotate for haproxy.log: | ||
| + | <code bash> | ||
| + | cat << EOF >> / | ||
| + | compress | ||
| + | |||
| + | / | ||
| + | weekly | ||
| + | rotate 4 | ||
| + | missingok | ||
| + | compress | ||
| + | minsize 100k | ||
| + | } | ||
| + | EOF | ||
| + | |||
| + | </ | ||
| + | Restart HAProxy and syslog: | ||
| + | <code bash> | ||
| + | systemctl restart rsyslog | ||
| + | systemctl restart haproxy | ||
| + | </ | ||
| + | ===== Create database' | ||
| + | Login into the MySQL node. | ||
| + | |||
| + | Remove previously created users and databases, if any: | ||
| + | <code sql> | ||
| + | mysql -u root | ||
| + | drop database if exists keystone; | ||
| + | drop database if exists glance; | ||
| + | drop database if exists nova; | ||
| + | drop database if exists neutron; | ||
| + | drop database if exists cinder; | ||
| + | /* | ||
| + | Following commands will raise errors if users are nonexistent. | ||
| + | 'drop user if exists' | ||
| + | http:// | ||
| + | */ | ||
| + | drop user ' | ||
| + | drop user ' | ||
| + | drop user ' | ||
| + | drop user ' | ||
| + | drop user ' | ||
| + | drop user ' | ||
| + | drop user ' | ||
| + | drop user ' | ||
| + | drop user ' | ||
| + | drop user ' | ||
| + | flush privileges; | ||
| + | quit | ||
| + | </ | ||
| + | Create database and grant users: | ||
| + | <code sql> | ||
| + | mysql -u root | ||
| + | CREATE DATABASE keystone; | ||
| + | GRANT ALL ON keystone.* TO ' | ||
| + | GRANT ALL ON keystone.* TO ' | ||
| + | CREATE DATABASE glance; | ||
| + | GRANT ALL ON glance.* TO ' | ||
| + | GRANT ALL ON glance.* TO ' | ||
| + | CREATE DATABASE nova; | ||
| + | GRANT ALL ON nova.* TO ' | ||
| + | GRANT ALL ON nova.* TO ' | ||
| + | CREATE DATABASE neutron; | ||
| + | GRANT ALL ON neutron.* TO ' | ||
| + | GRANT ALL ON neutron.* TO ' | ||
| + | CREATE DATABASE cinder; | ||
| + | GRANT ALL ON cinder.* TO ' | ||
| + | GRANT ALL ON cinder.* TO ' | ||
| + | FLUSH PRIVILEGES; | ||
| + | commit; | ||
| + | quit | ||
| + | </ | ||
| + | Logout from MySQL node. | ||
| + | |||
| + | ===== Install OpenStack software on both controller nodes ===== | ||
| + | First install the YUM repo from RDO: | ||
| + | <code bash> | ||
| + | yum install -y https:// | ||
| + | </ | ||
| + | Install the packages for Keystone, Glance, Nova, Neutron and Horizon(Dashboard): | ||
| + | <code bash> | ||
| + | yum install -y openstack-keystone python-keystoneclient openstack-utils \ | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | ===== Configure Keystone on primary node ===== | ||
| + | Apply a workaround to a known bug (see this [[http:// | ||
| + | <code bash> | ||
| + | openstack-config --set / | ||
| + | </ | ||
| + | Proceed with Keystone setup: | ||
| + | <code bash> | ||
| + | export SERVICE_TOKEN=$(openssl rand -hex 10) | ||
| + | echo $SERVICE_TOKEN > ~/ | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | keystone-manage pki_setup --keystone-user keystone --keystone-group keystone | ||
| + | chown -R keystone: | ||
| + | su keystone -s /bin/sh -c " | ||
| + | </ | ||
| + | |||
| + | Start Keystone: | ||
| + | |||
| + | <code bash> | ||
| + | systemctl start openstack-keystone | ||
| + | systemctl enable openstack-keystone | ||
| + | </ | ||
| + | |||
| + | Get access to Keystone and create the admin user and tenant: | ||
| + | <code bash> | ||
| + | export OS_SERVICE_TOKEN=`cat ~/ | ||
| + | export OS_SERVICE_ENDPOINT=http:// | ||
| + | keystone service-create --name=keystone --type=identity --description=" | ||
| + | </ | ||
| + | The system will respond something like: | ||
| + | |||
| + | <code sql> | ||
| + | +-------------+----------------------------------+ | ||
| + | | | ||
| + | +-------------+----------------------------------+ | ||
| + | | description | Keystone Identity Service | ||
| + | | | ||
| + | | id | 5363ecce39614aefa80ce8c2f9404691 | | ||
| + | | | ||
| + | | | ||
| + | +-------------+----------------------------------+ | ||
| + | </ | ||
| + | |||
| + | Subsequent output from the system are suppressed. | ||
| + | |||
| + | <code bash> | ||
| + | keystone endpoint-create --service keystone --publicurl http:// | ||
| + | keystone user-create --name admin --pass ADMIN_PASS | ||
| + | keystone role-create --name admin | ||
| + | keystone tenant-create --name admin | ||
| + | keystone role-create --name Member | ||
| + | keystone user-role-add --user admin --role admin --tenant admin | ||
| + | \rm -f $HOME/ | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | keystone tenant-create --name services --description " | ||
| + | </ | ||
| + | ==== Check it ==== | ||
| + | In order to check that the Keystone service is well installed, copy the '' | ||
| + | <code bash> | ||
| + | $ keystone user-list | ||
| + | +----------------------------------+-------+---------+-------+ | ||
| + | | id | name | enabled | email | | ||
| + | +----------------------------------+-------+---------+-------+ | ||
| + | | 60aa8974cf4d4736b28b04ffa52492ab | admin | | ||
| + | +----------------------------------+-------+---------+-------+ | ||
| + | </ | ||
| + | |||
| + | ==== Setup recurring token flush ==== | ||
| + | It's better to do this on both controller nodes. | ||
| + | |||
| + | See origin of the problem [[http:// | ||
| + | |||
| + | Create the file ''/ | ||
| + | <code bash> | ||
| + | cat << EOF >> / | ||
| + | #!/bin/sh | ||
| + | logger -t keystone-cleaner " | ||
| + | / | ||
| + | logger -t keystone-cleaner " | ||
| + | EOF | ||
| + | </ | ||
| + | Since the openstack-keystone package rotates all logs in ''/ | ||
| + | |||
| + | Execute: | ||
| + | <code bash> | ||
| + | cat << EOF > / | ||
| + | / | ||
| + | EOF | ||
| + | |||
| + | chmod +x / | ||
| + | chmod 0644 / | ||
| + | </ | ||
| + | ===== Configure RabbitMQ message broker on primary node ===== | ||
| + | Define the TCP port range allowed for inter-node communication (this is needed for cluster mode of RabbitMQ) | ||
| + | <code bash> | ||
| + | \rm -f / | ||
| + | cat << EOF >> / | ||
| + | [{kernel, [ {inet_dist_listen_min, | ||
| + | EOF | ||
| + | </ | ||
| + | Correct the logrotate configuration file to use rabbitmqctl instead of the deprecated ' | ||
| + | <code bash> | ||
| + | sed -i '/ | ||
| + | </ | ||
| + | Start and enable Rabbit | ||
| + | <code bash> | ||
| + | systemctl start rabbitmq-server | ||
| + | systemctl enable rabbitmq-server | ||
| + | </ | ||
| + | ===== Configure Glance on primary node ===== | ||
| + | Login into the primary controller node, or wherever you've installed the Keystone' | ||
| + | <code bash> | ||
| + | source keystone_admin.sh | ||
| + | export OS_SERVICE_TOKEN=`cat ~/ | ||
| + | export OS_SERVICE_ENDPOINT=http:// | ||
| + | </ | ||
| + | Ensure SERVICE_ENDPOINT and SERVICE_TOKEN are both set.\\ | ||
| + | Then create the Glance user and image service in the Keystone' | ||
| + | <code bash> | ||
| + | keystone user-create --name glance --pass GLANCE_PASS | ||
| + | keystone user-role-add --user glance --role admin --tenant services | ||
| + | keystone service-create --name glance --type image --description " | ||
| + | keystone endpoint-create --service glance --publicurl " | ||
| + | </ | ||
| + | Login into the primary controller node, modify the relevant configuration files: | ||
| + | |||
| + | **glance-api.conf** | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | DEFAULT bind_host 0.0.0.0 | ||
| + | DEFAULT registry_host 192.168.60.180 | ||
| + | DEFAULT notification_driver noop | ||
| + | DEFAULT sql_connection " | ||
| + | DEFAULT sql_idle_timeout 30 | ||
| + | keystone_authtoken auth_host 192.168.60.180 | ||
| + | keystone_authtoken auth_port 35357 | ||
| + | keystone_authtoken auth_protocol http | ||
| + | keystone_authtoken auth_uri http:// | ||
| + | keystone_authtoken admin_tenant_name services | ||
| + | keystone_authtoken admin_user glance | ||
| + | keystone_authtoken admin_password GLANCE_PASS | ||
| + | paste_deploy flavor " | ||
| + | EOF | ||
| + | |||
| + | # The following parameter should equals the CPU number | ||
| + | openstack-config --set / | ||
| + | |||
| + | </ | ||
| + | **glance-registry.conf** | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | DEFAULT bind_host 0.0.0.0 | ||
| + | keystone_authtoken admin_tenant_name services | ||
| + | keystone_authtoken admin_user glance | ||
| + | keystone_authtoken admin_password GLANCE_PASS | ||
| + | keystone_authtoken auth_host 192.168.60.180 | ||
| + | keystone_authtoken auth_port 35357 | ||
| + | keystone_authtoken auth_protocol http | ||
| + | keystone_authtoken auth_uri http:// | ||
| + | database connection " | ||
| + | database idle_timeout 30 | ||
| + | paste_deploy flavor keystone | ||
| + | EOF | ||
| + | |||
| + | </ | ||
| + | While still logged into the primary controller node, prepare the paths: | ||
| + | <code bash> | ||
| + | mkdir -p / | ||
| + | chown -R glance / | ||
| + | chown -R glance / | ||
| + | chown -R glance: | ||
| + | </ | ||
| + | ... and initialize the Glance' | ||
| + | <code bash> | ||
| + | # su glance -s /bin/sh | ||
| + | /root $ glance-manage db_sync | ||
| + | /root $ exit | ||
| + | </ | ||
| + | |||
| + | As of 26/02/2015 there is a bug that might prevent the script from working. Check ''/ | ||
| + | < | ||
| + | CRITICAL glance [-] ValueError: Tables " | ||
| + | glance Traceback (most recent call last): | ||
| + | glance | ||
| + | glance | ||
| + | glance | ||
| + | glance | ||
| + | glance | ||
| + | glance | ||
| + | glance | ||
| + | glance | ||
| + | glance | ||
| + | glance | ||
| + | glance | ||
| + | glance | ||
| + | glance ValueError: Tables " | ||
| + | glance | ||
| + | </ | ||
| + | The workaround is (see https:// | ||
| + | <code mysql> | ||
| + | mysql -u glance -h 192.168.60.10 -p | ||
| + | use glance; | ||
| + | alter table migrate_version convert to character set utf8; | ||
| + | exit; | ||
| + | </ | ||
| + | Than reissue | ||
| + | <code bash> | ||
| + | # su glance -s /bin/sh | ||
| + | /root $ glance-manage db_sync | ||
| + | /root $ exit | ||
| + | </ | ||
| + | |||
| + | To prevent unprivileged users to register public image, change the policy in ''/ | ||
| + | <code bash> | ||
| + | " | ||
| + | </ | ||
| + | to | ||
| + | <code bash> | ||
| + | " | ||
| + | </ | ||
| + | |||
| + | Always sitting on the primary controller node, start and enable the Glance services: | ||
| + | <code bash> | ||
| + | systemctl start openstack-glance-registry | ||
| + | systemctl start openstack-glance-api | ||
| + | systemctl enable openstack-glance-registry | ||
| + | systemctl enable openstack-glance-api | ||
| + | </ | ||
| + | ... and finally create the credential file for glance | ||
| + | <code bash> | ||
| + | cat << EOF > glancerc | ||
| + | export OS_USERNAME=glance | ||
| + | export OS_TENANT_NAME=services | ||
| + | export OS_PASSWORD=GLANCE_PASS | ||
| + | export OS_AUTH_URL=http:// | ||
| + | EOF | ||
| + | </ | ||
| + | You can copy the credential file to any machine you like, where you've installed the Python Glance' | ||
| + | |||
| + | ==== Check it ==== | ||
| + | In order to check that Glance is correctly installed, login into any machines where you've installed the Glance' | ||
| + | < | ||
| + | pcmazzon ~ $ wget http:// | ||
| + | [...] | ||
| + | Saving to: “cirros-0.3.1-x86_64-disk.img” | ||
| + | [...] | ||
| + | 2013-12-06 12:25:03 (3.41 MB/s) - “cirros-0.3.1-x86_64-disk.img” saved [13147648/ | ||
| + | |||
| + | pcmazzon ~ $ glance image-create --name=cirros --disk-format=qcow2 --container-format=bare --is-public=True < cirros-0.3.1-x86_64-disk.img | ||
| + | +------------------+--------------------------------------+ | ||
| + | | Property | ||
| + | +------------------+--------------------------------------+ | ||
| + | | checksum | ||
| + | | container_format | bare | | ||
| + | | created_at | ||
| + | | deleted | ||
| + | | deleted_at | ||
| + | | disk_format | ||
| + | | id | 0fb09e44-a25c-49e2-a046-191a7989aebc | | ||
| + | | is_public | ||
| + | | min_disk | ||
| + | | min_ram | ||
| + | | name | cirros | ||
| + | | owner | 1af77118d9db4c9a959810aa7d67c6d8 | ||
| + | | protected | ||
| + | | size | 13147648 | ||
| + | | status | ||
| + | | updated_at | ||
| + | | virtual_size | ||
| + | +------------------+--------------------------------------+ | ||
| + | |||
| + | pcmazzon ~ $ glance index | ||
| + | ID | ||
| + | ------------------------------------ ------------------------------ -------------------- -------------------- -------------- | ||
| + | 0fb09e44-a25c-49e2-a046-191a7989aebc cirros | ||
| + | </ | ||
| + | |||
| + | ===== Configure Nova on primary node ===== | ||
| + | Login into the primary controller node, or wherever you've installed the Keystone' | ||
| + | <code bash> | ||
| + | source keystone_admin.sh | ||
| + | </ | ||
| + | Add NOVA service, user and endpoint to Keystone' | ||
| + | <code bash> | ||
| + | keystone user-create --name nova --pass NOVA_PASS | ||
| + | keystone user-role-add --user nova --role admin --tenant services | ||
| + | keystone service-create --name nova --type compute --description " | ||
| + | |||
| + | SERVICE_NOVA_ID=`keystone service-list|grep nova|awk ' | ||
| + | keystone endpoint-create --service-id $SERVICE_NOVA_ID \ | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | keystone service-create --name nova_ec2 --type ec2 --description "EC2 Service" | ||
| + | |||
| + | SERVICE_EC2_ID=`keystone service-list|grep nova_ec2|awk ' | ||
| + | keystone endpoint-create --service-id $SERVICE_EC2_ID \ | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | Login into the primary controller node and modify the relevant configuration files: | ||
| + | |||
| + | **nova.conf: | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | database connection " | ||
| + | database idle_timeout 30 | ||
| + | DEFAULT rpc_backend nova.openstack.common.rpc.impl_kombu | ||
| + | DEFAULT rabbit_hosts 192.168.60.152: | ||
| + | DEFAULT rabbit_ha_queues True | ||
| + | DEFAULT glance_host 192.168.60.180 | ||
| + | DEFAULT my_ip 192.168.60.180 | ||
| + | DEFAULT vncserver_listen 90.147.143.10 | ||
| + | DEFAULT vncserver_proxyclient_address 192.168.60.180 | ||
| + | DEFAULT auth_strategy keystone | ||
| + | keystone_authtoken auth_host 192.168.60.180 | ||
| + | keystone_authtoken auth_protocol http | ||
| + | keystone_authtoken auth_port 35357 | ||
| + | keystone_authtoken admin_user nova | ||
| + | keystone_authtoken admin_tenant_name services | ||
| + | keystone_authtoken admin_password NOVA_PASS | ||
| + | DEFAULT api_paste_config / | ||
| + | DEFAULT neutron_metadata_proxy_shared_secret METADATA_PASS | ||
| + | DEFAULT service_neutron_metadata_proxy true | ||
| + | DEFAULT memcached_servers 192.168.60.152: | ||
| + | DEFAULT enabled_apis ec2, | ||
| + | DEFAULT ec2_listen 0.0.0.0 | ||
| + | DEFAULT ec2_listen_port 8773 | ||
| + | DEFAULT cpu_allocation_ratio 4.0 | ||
| + | EOF | ||
| + | |||
| + | # eliminato ????' | ||
| + | # openstack-config --set / | ||
| + | </ | ||
| + | **api-paste.ini: | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done <<EOF | ||
| + | filter: | ||
| + | filter: | ||
| + | filter: | ||
| + | filter: | ||
| + | filter: | ||
| + | filter: | ||
| + | filter: | ||
| + | filter: | ||
| + | EOF | ||
| + | |||
| + | </ | ||
| + | While still logged into the primary controller node, initialize the database (NOTE that this is **db sync** without ' | ||
| + | <code bash> | ||
| + | # su nova -s /bin/sh | ||
| + | /root $ nova-manage db sync | ||
| + | /root $ exit | ||
| + | </ | ||
| + | Modify the file / | ||
| + | <code bash> | ||
| + | # cd /etc/nova/ | ||
| + | # patch -p0 << EOP | ||
| + | --- / | ||
| + | +++ / | ||
| + | @@ -1,7 +1,8 @@ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | - " | ||
| + | + " | ||
| + | + " | ||
| + | |||
| + | " | ||
| + | |||
| + | @@ -9,6 +10,7 @@ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | + " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | EOP | ||
| + | </ | ||
| + | You should receive the message: | ||
| + | < | ||
| + | patching file policy.json | ||
| + | </ | ||
| + | Start and enable the nova services: | ||
| + | <code bash> | ||
| + | systemctl start openstack-nova-api | ||
| + | systemctl start openstack-nova-cert | ||
| + | systemctl start openstack-nova-consoleauth | ||
| + | systemctl start openstack-nova-scheduler | ||
| + | systemctl start openstack-nova-conductor | ||
| + | systemctl start openstack-nova-novncproxy | ||
| + | |||
| + | systemctl enable openstack-nova-api | ||
| + | systemctl enable openstack-nova-cert | ||
| + | systemctl enable openstack-nova-consoleauth | ||
| + | systemctl enable openstack-nova-scheduler | ||
| + | systemctl enable openstack-nova-conductor | ||
| + | systemctl enable openstack-nova-novncproxy | ||
| + | </ | ||
| + | ==== Check it ==== | ||
| + | Preferrably from your desktop, or wherever you've copied the '' | ||
| + | < | ||
| + | pcmazzon ~ $ nova service-list | ||
| + | +------------------+-----------------------------+----------+---------+-------+----------------------------+-----------------+ | ||
| + | | Binary | ||
| + | +------------------+-----------------------------+----------+---------+-------+----------------------------+-----------------+ | ||
| + | | nova-consoleauth | cld-blu-03.cloud.pd.infn.it | internal | enabled | up | 2015-03-04T09: | ||
| + | | nova-conductor | ||
| + | | nova-scheduler | ||
| + | | nova-cert | ||
| + | +------------------+-----------------------------+----------+---------+-------+----------------------------+-----------------+ | ||
| + | |||
| + | pcmazzon ~ $ nova availability-zone-list | ||
| + | +--------------------------------+----------------------------------------+ | ||
| + | | Name | Status | ||
| + | +--------------------------------+----------------------------------------+ | ||
| + | | internal | ||
| + | | |- cld-blu-03.cloud.pd.infn.it | | | ||
| + | | | |- nova-conductor | ||
| + | | | |- nova-consoleauth | ||
| + | | | |- nova-scheduler | ||
| + | | | |- nova-cert | ||
| + | +--------------------------------+----------------------------------------+ | ||
| + | |||
| + | pcmazzon ~ $ nova endpoints | ||
| + | +-------------+----------------------------------+ | ||
| + | | glance | ||
| + | +-------------+----------------------------------+ | ||
| + | | adminURL | ||
| + | | id | 3d9b63cc4b624220a3db1a2da99b241f | | ||
| + | | internalURL | http:// | ||
| + | | publicURL | ||
| + | | region | ||
| + | +-------------+----------------------------------+ | ||
| + | +-------------+----------------------------------------------------------------+ | ||
| + | | nova | Value | | ||
| + | +-------------+----------------------------------------------------------------+ | ||
| + | | adminURL | ||
| + | | id | 04fcb15180a34ec7a239888decfd55dd | ||
| + | | internalURL | http:// | ||
| + | | publicURL | ||
| + | | region | ||
| + | | serviceName | nova | | ||
| + | +-------------+----------------------------------------------------------------+ | ||
| + | +-------------+-------------------------------------------+ | ||
| + | | nova_ec2 | ||
| + | +-------------+-------------------------------------------+ | ||
| + | | adminURL | ||
| + | | id | 36d3d9f4007a4aeabb639530f4400d89 | ||
| + | | internalURL | http:// | ||
| + | | publicURL | ||
| + | | region | ||
| + | +-------------+-------------------------------------------+ | ||
| + | +-------------+----------------------------------+ | ||
| + | | keystone | ||
| + | +-------------+----------------------------------+ | ||
| + | | adminURL | ||
| + | | id | 208f9156abf945509993babdb46579d9 | | ||
| + | | internalURL | http:// | ||
| + | | publicURL | ||
| + | | region | ||
| + | +-------------+----------------------------------+ | ||
| + | </ | ||
| + | Even better if the above commands can be tried from your desktop, after sourcing the '' | ||
| + | ==== Create nova user's keypair and distribute them to other nodes ==== | ||
| + | <code bash> | ||
| + | usermod -s /bin/bash nova | ||
| + | mkdir -p -m 700 ~nova/.ssh | ||
| + | chown nova.nova ~nova/.ssh | ||
| + | su - nova | ||
| + | $ cd .ssh | ||
| + | $ ssh-keygen -f id_rsa -b 1024 -P "" | ||
| + | $ cp id_rsa.pub authorized_keys | ||
| + | |||
| + | $ cat << EOF >> config | ||
| + | Host * | ||
| + | | ||
| + | | ||
| + | EOF | ||
| + | $ exit | ||
| + | </ | ||
| + | Distribute the content of ''/ | ||
| + | |||
| + | ===== Configure Neutron on primary node ===== | ||
| + | Login into the primary controller node, or wherever you've installed the Keystone' | ||
| + | <code bash> | ||
| + | source ~/ | ||
| + | </ | ||
| + | Then, create the endpoint, service and user information in the Keystone' | ||
| + | <code bash> | ||
| + | keystone user-create --name neutron --pass NEUTRON_PASS | ||
| + | keystone user-role-add --user neutron --role admin --tenant services | ||
| + | keystone service-create --name neutron --type network --description " | ||
| + | SERVICE_NEUTRON_ID=`keystone service-list|grep neutron|awk ' | ||
| + | keystone endpoint-create --service-id $SERVICE_NEUTRON_ID \ | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | Login into the primary controller node and modify the configuration files. | ||
| + | |||
| + | **neutron.conf: | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | keystone_authtoken auth_host 192.168.60.180 | ||
| + | keystone_authtoken admin_tenant_name services | ||
| + | keystone_authtoken admin_user neutron | ||
| + | keystone_authtoken admin_password NEUTRON_PASS | ||
| + | keystone_authtoken auth_url http:// | ||
| + | keystone_authtoken auth_uri http:// | ||
| + | DEFAULT auth_strategy keystone | ||
| + | DEFAULT rpc_backend neutron.openstack.common.rpc.impl_kombu | ||
| + | DEFAULT rabbit_hosts 192.168.60.152: | ||
| + | DEFAULT rabbit_ha_queues True | ||
| + | DEFAULT core_plugin ml2 | ||
| + | DEFAULT service_plugins router | ||
| + | database connection " | ||
| + | DEFAULT verbose False | ||
| + | DEFAULT dhcp_agents_per_network 2 | ||
| + | DEFAULT dhcp_lease_duration 86400 | ||
| + | DEFAULT agent_down_time 75 | ||
| + | DEFAULT notify_nova_on_port_status_changes True | ||
| + | DEFAULT notify_nova_on_port_data_changes True | ||
| + | DEFAULT nova_url http:// | ||
| + | DEFAULT nova_admin_username nova | ||
| + | #attention the value in the result of command | ||
| + | DEFAULT nova_admin_tenant_id $(keystone tenant-list | awk '/ service / { print $2 }') | ||
| + | DEFAULT nova_admin_password NOVA_PASS | ||
| + | DEFAULT nova_admin_auth_url http:// | ||
| + | agent report_interval 30 | ||
| + | EOF | ||
| + | |||
| + | openstack-config --set / | ||
| + | </ | ||
| + | **api-paste.ini: | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | filter: | ||
| + | filter: | ||
| + | filter: | ||
| + | filter: | ||
| + | EOF | ||
| + | </ | ||
| + | **ml2_conf.ini: | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | ml2 type_drivers gre, | ||
| + | ml2 tenant_network_types gre | ||
| + | ml2 mechanism_drivers openvswitch | ||
| + | ml2_type_gre tunnel_id_ranges 1:1000 | ||
| + | securitygroup firewall_driver neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver | ||
| + | securitygroup enable_security_group True | ||
| + | EOF | ||
| + | |||
| + | ln -s / | ||
| + | |||
| + | </ | ||
| + | **nova.conf: | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | DEFAULT network_api_class nova.network.neutronv2.api.API | ||
| + | DEFAULT neutron_url http:// | ||
| + | DEFAULT neutron_auth_strategy keystone | ||
| + | DEFAULT neutron_admin_tenant_name services | ||
| + | DEFAULT neutron_admin_username neutron | ||
| + | DEFAULT neutron_admin_password NEUTRON_PASS | ||
| + | DEFAULT neutron_admin_auth_url http:// | ||
| + | DEFAULT linuxnet_interface_driver nova.network.linux_net.LinuxOVSInterfaceDriver | ||
| + | DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver | ||
| + | DEFAULT security_group_api neutron | ||
| + | EOF | ||
| + | </ | ||
| + | Restart NOVA's services (since you've just modified its configuration file) | ||
| + | <code bash> | ||
| + | systemctl restart openstack-nova-api | ||
| + | systemctl restart openstack-nova-scheduler | ||
| + | systemctl restart openstack-nova-conductor | ||
| + | </ | ||
| + | While still logged into the primary controller node, start and enable the Neutron server: | ||
| + | <code bash> | ||
| + | neutron-db-manage --config-file / | ||
| + | </ | ||
| + | It's output should be like: | ||
| + | <code bash> | ||
| + | No handlers could be found for logger " | ||
| + | INFO [alembic.migration] Context impl MySQLImpl. | ||
| + | INFO [alembic.migration] Will assume non-transactional DDL. | ||
| + | </ | ||
| + | Now start '' | ||
| + | <code bash> | ||
| + | systemctl start neutron-server | ||
| + | systemctl enable neutron-server | ||
| + | |||
| + | </ | ||
| + | ===== Configure Cinder on primary node ===== | ||
| + | |||
| + | Login into the primary controller node, or wherever you've installed the Keystone' | ||
| + | |||
| + | <code bash> | ||
| + | source ~/ | ||
| + | </ | ||
| + | |||
| + | Then, create the endpoint, service and user information in the Keystone' | ||
| + | |||
| + | <code bash> | ||
| + | keystone user-create --name cinder --pass CINDER_PASS | ||
| + | keystone user-role-add --user cinder --role admin --tenant services | ||
| + | keystone service-create --name cinder --type volume --description " | ||
| + | keystone service-create --name=cinderv2 --type=volumev2 --description=" | ||
| + | |||
| + | keystone endpoint-create --service cinder | ||
| + | keystone endpoint-create --service cinderv2 --publicurl http:// | ||
| + | </ | ||
| + | Login into the primary controller node and modify the configuration files. | ||
| + | |||
| + | **cinder.conf**: | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | DEFAULT auth_strategy keystone | ||
| + | keystone_authtoken auth_host 192.168.60.180 | ||
| + | keystone_authtoken admin_tenant_name services | ||
| + | keystone_authtoken admin_user cinder | ||
| + | keystone_authtoken admin_password CINDER_PASS | ||
| + | DEFAULT rpc_backend cinder.openstack.common.rpc.impl_kombu | ||
| + | DEFAULT rabbit_hosts 192.168.60.152: | ||
| + | DEFAULT rabbit_ha_queues True | ||
| + | DEFAULT sql_idle_timeout 30 | ||
| + | DEFAULT rootwrap_config / | ||
| + | DEFAULT api_paste_config / | ||
| + | DEFAULT control_exchange cinder | ||
| + | DEFAULT sql_connection " | ||
| + | EOF | ||
| + | # | ||
| + | </ | ||
| + | Initialize the Cinder database (NOTE that this is **db sync** without ' | ||
| + | <code bash> | ||
| + | # su cinder -s /bin/sh | ||
| + | /root $ cinder-manage db sync | ||
| + | /root $ exit | ||
| + | </ | ||
| + | Modify the file / | ||
| + | <code bash> | ||
| + | # cd / | ||
| + | # patch -p0 << EOP | ||
| + | --- policy.json.orig | ||
| + | +++ policy.json 2015-09-22 16: | ||
| + | @@ -1,7 +1,8 @@ | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | - " | ||
| + | + " | ||
| + | + " | ||
| + | |||
| + | " | ||
| + | EOP | ||
| + | </ | ||
| + | You should receive the message: | ||
| + | < | ||
| + | patching file policy.json | ||
| + | </ | ||
| + | And finally start API services: | ||
| + | <code bash> | ||
| + | systemctl start openstack-cinder-api | ||
| + | systemctl enable openstack-cinder-api | ||
| + | systemctl start openstack-cinder-scheduler | ||
| + | systemctl enable openstack-cinder-scheduler | ||
| + | </ | ||
| + | ===== Configure Horizon (Dashboard) on primary node ===== | ||
| + | Modify the file ''/ | ||
| + | |||
| + | Modify the file ''/ | ||
| + | <code bash> | ||
| + | CACHES = { | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | you can try this command: | ||
| + | <code bash> | ||
| + | sed -i " | ||
| + | </ | ||
| + | Note that the TCP port 11211 and IP address must match those ones contained in the file ''/ | ||
| + | <code bash> | ||
| + | PORT=" | ||
| + | USER=" | ||
| + | MAXCONN=" | ||
| + | CACHESIZE=" | ||
| + | OPTIONS=" | ||
| + | </ | ||
| + | |||
| + | Now, look for the string '' | ||
| + | <code bash> | ||
| + | OPENSTACK_HOST = " | ||
| + | </ | ||
| + | by executing this command: | ||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | </ | ||
| + | |||
| + | Modify the '' | ||
| + | <code bash> | ||
| + | ALLOWED_HOSTS = [' | ||
| + | </ | ||
| + | by executing the command | ||
| + | <code bash> | ||
| + | sed -i " | ||
| + | </ | ||
| + | Execute the following commands: | ||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | </ | ||
| + | |||
| + | To address an observed problem related to number of open files execute the following command: | ||
| + | <code bash> | ||
| + | cat << EOF >> / | ||
| + | * soft nofile | ||
| + | * hard nofile | ||
| + | EOF | ||
| + | |||
| + | </ | ||
| + | Start and enable the WebServer: | ||
| + | <code bash> | ||
| + | systemctl start httpd | ||
| + | systemctl start memcached | ||
| + | systemctl enable httpd | ||
| + | systemctl enable memcached | ||
| + | </ | ||
| + | ==== Configure Dashboard for SSL sessions ==== | ||
| + | **Please, do not consider this configuration as optional. It should be done in order to crypt the users' passwords.** | ||
| + | |||
| + | Install the '' | ||
| + | <code bash> | ||
| + | yum -y install mod_ssl | ||
| + | </ | ||
| + | Execute the following commands: | ||
| + | <code bash> | ||
| + | #sed -i ' | ||
| + | #sed -i ' | ||
| + | sed -i ' | ||
| + | sed -i ' | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | </ | ||
| + | |||
| + | Restart httpd: | ||
| + | <code bash> | ||
| + | systemctl restart httpd | ||
| + | </ | ||
| + | ===== ===== | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | |||
| + | **You can stop here if you don't need the High Availability with the second node neither the SSL support.** | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | ===== Configure and " | ||
| + | Login into the secondary controller node and configure the RabbitMQ to use the already specified TCP port range: | ||
| + | <code bash> | ||
| + | \rm -f / | ||
| + | cat << EOF >> / | ||
| + | [{kernel, [ {inet_dist_listen_min, | ||
| + | EOF | ||
| + | </ | ||
| + | While still logged into the secondary controller node, start and enable Rabbit: | ||
| + | <code bash> | ||
| + | systemctl start rabbitmq-server | ||
| + | systemctl enable rabbitmq-server | ||
| + | </ | ||
| + | This first start has generated the erlang cookie. Then stop the server: | ||
| + | <code bash> | ||
| + | systemctl stop rabbitmq-server | ||
| + | </ | ||
| + | RabbitMQ' | ||
| + | <code bash> | ||
| + | scp root@cld-blu-03.cloud.pd.infn.it:/ | ||
| + | </ | ||
| + | Change cookie' | ||
| + | <code bash> | ||
| + | chown rabbitmq: | ||
| + | systemctl start rabbitmq-server | ||
| + | |||
| + | </ | ||
| + | While logged into the secondary controller node, stop the application: | ||
| + | <code bash> | ||
| + | rabbitmqctl stop_app | ||
| + | rabbitmqctl reset | ||
| + | </ | ||
| + | ... then join the server running in the primary node: | ||
| + | <code bash> | ||
| + | rabbitmqctl join_cluster rabbit@cld-blu-03 | ||
| + | Clustering node ' | ||
| + | ...done. | ||
| + | |||
| + | rabbitmqctl start_app | ||
| + | Starting node ' | ||
| + | ...done. | ||
| + | |||
| + | # see: http:// | ||
| + | rabbitmqctl set_policy HA ' | ||
| + | </ | ||
| + | ==== Check it ==== | ||
| + | <code bash> | ||
| + | [root@cld-blu-04 ~]# rabbitmqctl cluster_status | ||
| + | Cluster status of node ' | ||
| + | [{nodes, | ||
| + | | ||
| + | | ||
| + | ...done. | ||
| + | |||
| + | [root@cld-blu-04 ~]# rabbitmqctl list_policies | ||
| + | Listing policies ... | ||
| + | / | ||
| + | ...done. | ||
| + | |||
| + | [root@cld-blu-03 ~]# rabbitmqctl cluster_status | ||
| + | Cluster status of node ' | ||
| + | [{nodes, | ||
| + | | ||
| + | | ||
| + | ...done. | ||
| + | |||
| + | [root@cld-blu-03 ~]# rabbitmqctl list_policies | ||
| + | Listing policies ... | ||
| + | / | ||
| + | ...done. | ||
| + | |||
| + | </ | ||
| + | ===== Configure services on secondary node ===== | ||
| + | Login into the secondary controller node; copy Keystone, Glance, Nova, Neutron, Cinder and Horizon' | ||
| + | <code bash> | ||
| + | scp cld-blu-03.cloud.pd.infn.it:/ | ||
| + | scp -r cld-blu-03.cloud.pd.infn.it:/ | ||
| + | scp -r cld-blu-03.cloud.pd.infn.it:/ | ||
| + | scp -r cld-blu-03.cloud.pd.infn.it:/ | ||
| + | scp -r cld-blu-03.cloud.pd.infn.it:/ | ||
| + | scp -r cld-blu-03.cloud.pd.infn.it:/ | ||
| + | scp cld-blu-03.cloud.pd.infn.it:/ | ||
| + | \rm -f / | ||
| + | ln -s / | ||
| + | </ | ||
| + | While still logged into the secondary controller node, finalize the setup: | ||
| + | <code bash> | ||
| + | keystone-manage pki_setup --keystone-user keystone --keystone-group keystone | ||
| + | mkdir -p / | ||
| + | mkdir -p / | ||
| + | chown -R glance: | ||
| + | chown -R keystone: | ||
| + | chown -R neutron: | ||
| + | </ | ||
| + | |||
| + | Setup Dashboard' | ||
| + | |||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | </ | ||
| + | |||
| + | Setup HTTPS for Dashboard: | ||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | sed -i ' | ||
| + | echo " | ||
| + | echo " | ||
| + | echo " | ||
| + | </ | ||
| + | |||
| + | Increase the number of allowed open files: | ||
| + | |||
| + | <code bash> | ||
| + | cat << EOF >> / | ||
| + | * soft nofile | ||
| + | * hard nofile | ||
| + | EOF | ||
| + | |||
| + | </ | ||
| + | |||
| + | ... change the memcached' | ||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | </ | ||
| + | |||
| + | ... change the location of the memcached service in the dashboard' | ||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | </ | ||
| + | |||
| + | ... and finally turn all services ON, and enable them: | ||
| + | |||
| + | <code bash> | ||
| + | systemctl start openstack-keystone | ||
| + | systemctl start openstack-glance-registry | ||
| + | systemctl start openstack-glance-api | ||
| + | systemctl start openstack-nova-api | ||
| + | systemctl start openstack-nova-cert | ||
| + | systemctl start openstack-nova-consoleauth | ||
| + | systemctl start openstack-nova-scheduler | ||
| + | systemctl start openstack-nova-conductor | ||
| + | systemctl start openstack-nova-novncproxy | ||
| + | systemctl start neutron-server | ||
| + | systemctl start httpd | ||
| + | systemctl start memcached | ||
| + | systemctl start openstack-cinder-api | ||
| + | systemctl start openstack-cinder-scheduler | ||
| + | |||
| + | systemctl enable openstack-keystone | ||
| + | systemctl enable openstack-glance-registry | ||
| + | systemctl enable openstack-glance-api | ||
| + | systemctl enable openstack-nova-api | ||
| + | systemctl enable openstack-nova-cert | ||
| + | systemctl enable openstack-nova-consoleauth | ||
| + | systemctl enable openstack-nova-scheduler | ||
| + | systemctl enable openstack-nova-conductor | ||
| + | systemctl enable openstack-nova-novncproxy | ||
| + | systemctl enable neutron-server | ||
| + | systemctl enable httpd | ||
| + | systemctl enable memcached | ||
| + | systemctl enable openstack-cinder-api | ||
| + | systemctl enable openstack-cinder-scheduler | ||
| + | </ | ||
| + | ==== Check it ==== | ||
| + | On your desktop, source the file '' | ||
| + | <code bash> | ||
| + | bash-4.1$ nova availability-zone-list | ||
| + | +--------------------------------+----------------------------------------+ | ||
| + | | Name | Status | ||
| + | +--------------------------------+----------------------------------------+ | ||
| + | | internal | ||
| + | | |- cld-blu-03.cloud.pd.infn.it | | | ||
| + | | | |- nova-conductor | ||
| + | | | |- nova-consoleauth | ||
| + | | | |- nova-scheduler | ||
| + | | | |- nova-cert | ||
| + | | |- cld-blu-04.cloud.pd.infn.it | | | ||
| + | | | |- nova-conductor | ||
| + | | | |- nova-cert | ||
| + | | | |- nova-consoleauth | ||
| + | | | |- nova-scheduler | ||
| + | +--------------------------------+----------------------------------------+ | ||
| + | |||
| + | bash-4.1$ cinder service-list | ||
| + | +------------------+-----------------------------+------+---------+-------+----------------------------+ | ||
| + | | Binary | ||
| + | +------------------+-----------------------------+------+---------+-------+----------------------------+ | ||
| + | | cinder-scheduler | cld-blu-03.cloud.pd.infn.it | nova | enabled | | ||
| + | | cinder-scheduler | cld-blu-04.cloud.pd.infn.it | nova | enabled | | ||
| + | +------------------+-----------------------------+------+---------+-------+----------------------------+ | ||
| + | </ | ||
| + | |||
| + | ===== Optional: SSL configuration & INFN-AAI ===== | ||
| + | |||
| + | First of all, on both controller nodes, switch off all the OpenStack' | ||
| + | <code bash> | ||
| + | systemctl stop openstack-glance-registry | ||
| + | systemctl stop openstack-glance-api | ||
| + | systemctl stop openstack-nova-api | ||
| + | systemctl stop openstack-nova-cert | ||
| + | systemctl stop openstack-nova-consoleauth | ||
| + | systemctl stop openstack-nova-scheduler | ||
| + | systemctl stop openstack-nova-conductor | ||
| + | systemctl stop openstack-nova-novncproxy | ||
| + | systemctl stop neutron-server | ||
| + | systemctl stop httpd | ||
| + | systemctl stop openstack-cinder-api | ||
| + | systemctl stop openstack-cinder-scheduler | ||
| + | </ | ||
| + | ==== Configure HAProxy to act like an SSL terminator ==== | ||
| + | Before proceed note that | ||
| + | * **HAProxy 1.5.x** is required to support an SSL frontend. | ||
| + | * The '' | ||
| + | |||
| + | Modify '' | ||
| + | < | ||
| + | listen mysql-cluster-roundrobin | ||
| + | bind 192.168.60.180: | ||
| + | mode tcp | ||
| + | balance roundrobin | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | server | ||
| + | | ||
| + | listen mysql-cluster-roundrobin-public | ||
| + | bind 90.147.143.10: | ||
| + | mode tcp | ||
| + | balance roundrobin | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen nova-metadata | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen glance-registry | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen rabbitmq-server | ||
| + | bind 192.168.60.180: | ||
| + | balance roundrobin | ||
| + | mode tcp | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen epmd | ||
| + | bind 192.168.60.180: | ||
| + | balance roundrobin | ||
| + | server | ||
| + | server | ||
| + | |||
| + | listen memcached-cluster | ||
| + | bind 192.168.60.180: | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | frontend dashboard-ssl_public | ||
| + | bind 90.147.143.10: | ||
| + | option | ||
| + | mode tcp | ||
| + | default_backend dashboard_ssl_nodes | ||
| + | |||
| + | frontend keystone-auth | ||
| + | bind 192.168.60.180: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend keystoneauth | ||
| + | |||
| + | frontend keystone-api | ||
| + | bind 192.168.60.180: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend keystoneauth | ||
| + | |||
| + | frontend keystone-auth_public | ||
| + | bind 90.147.143.10: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend keystoneauth | ||
| + | |||
| + | frontend keystone-api_public | ||
| + | bind 90.147.143.10: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend keystoneapi | ||
| + | |||
| + | frontend glance-api | ||
| + | bind 192.168.60.180: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend glanceapi | ||
| + | |||
| + | frontend glance-api_public | ||
| + | bind 90.147.143.10: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend glanceapi | ||
| + | |||
| + | frontend nova-api | ||
| + | bind 192.168.60.180: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend novaapi | ||
| + | |||
| + | frontend nova-api_public | ||
| + | bind 90.147.143.10: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend novaapi | ||
| + | |||
| + | frontend cinder-api | ||
| + | bind 192.168.60.180: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend cinderapi | ||
| + | |||
| + | frontend cinder-api_public | ||
| + | bind 90.147.143.10: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend cinderapi | ||
| + | |||
| + | frontend neutron-server | ||
| + | bind 192.168.60.180: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend neutronapi | ||
| + | |||
| + | frontend neutron-server_public | ||
| + | bind 90.147.143.10: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend neutronapi | ||
| + | | ||
| + | frontend vnc_public | ||
| + | bind 90.147.143.10: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend novnc | ||
| + | |||
| + | frontend novaec2-api | ||
| + | bind 192.168.60.180: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend ec2api | ||
| + | |||
| + | frontend novaec2-api_public | ||
| + | bind 90.147.143.10: | ||
| + | mode http | ||
| + | option httpclose | ||
| + | option forwardfor | ||
| + | reqadd X-Forwarded-Proto: | ||
| + | default_backend ec2api | ||
| + | | ||
| + | backend dashboard_ssl_nodes | ||
| + | balance source | ||
| + | mode tcp | ||
| + | option ssl-hello-chk | ||
| + | server cld-blu-03.cloud.pd.infn.it 192.168.60.152: | ||
| + | server cld-blu-04.cloud.pd.infn.it 192.168.60.153: | ||
| + | |||
| + | backend keystoneauth | ||
| + | mode http | ||
| + | balance source | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | backend keystoneapi | ||
| + | mode http | ||
| + | balance source | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | backend glanceapi | ||
| + | mode http | ||
| + | balance source | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | backend novaapi | ||
| + | mode http | ||
| + | balance source | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | backend ec2api | ||
| + | mode http | ||
| + | balance source | ||
| + | option | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | backend cinderapi | ||
| + | mode http | ||
| + | balance source | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | backend neutronapi | ||
| + | mode http | ||
| + | balance source | ||
| + | option | ||
| + | server | ||
| + | server | ||
| + | |||
| + | backend novnc | ||
| + | mode http | ||
| + | balance source | ||
| + | server | ||
| + | server | ||
| + | </ | ||
| + | |||
| + | ... and restart the HAProxy daemon. | ||
| + | |||
| + | Now login into one of the two controller nodes, and do a precautionary unset all the OS_* variables: | ||
| + | <code bash> | ||
| + | unset OS_USERNAME | ||
| + | unset OS_TENANT_NAME | ||
| + | unset OS_PASSWORD | ||
| + | unset OS_AUTH_URL | ||
| + | </ | ||
| + | To get back access to Keystone issue the following commands: | ||
| + | <code bash> | ||
| + | export SERVICE_TOKEN=`cat ~/ | ||
| + | export SERVICE_ENDPOINT=http:// | ||
| + | </ | ||
| + | * Note 1: 192.168.60.152 is the IP address of the controller node you're logged into. | ||
| + | * Note 2: the file '' | ||
| + | |||
| + | Change Keystone' | ||
| + | <code bash> | ||
| + | KEYSTONE_SERVICE=$(keystone service-get keystone | grep ' id ' | awk ' | ||
| + | KEYSTONE_ENDPOINT=$(keystone endpoint-list | grep $KEYSTONE_SERVICE|awk ' | ||
| + | keystone endpoint-delete $KEYSTONE_ENDPOINT | ||
| + | |||
| + | keystone endpoint-create --region RegionOne --service-id $KEYSTONE_SERVICE --publicurl " | ||
| + | </ | ||
| + | Note: no need to restart '' | ||
| + | |||
| + | Change the '' | ||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | echo " | ||
| + | echo " | ||
| + | </ | ||
| + | Note: no need to do anything on the second controller node. The endpoint with the https url has been changed on the MySQL database; all this is transparent for the '' | ||
| + | ==== Check it ==== | ||
| + | <code bash> | ||
| + | unset SERVICE_TOKEN | ||
| + | unset SERVICE_ENDPOINT | ||
| + | source $HOME/ | ||
| + | keystone user-list | ||
| + | </ | ||
| + | ==== Glance ==== | ||
| + | Modify authentication parameters on both controller nodes: | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | keystone_authtoken auth_host cloud.cedc.csia.unipd.it | ||
| + | keystone_authtoken auth_protocol https | ||
| + | keystone_authtoken auth_uri https:// | ||
| + | keystone_authtoken cafile / | ||
| + | EOF | ||
| + | |||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | keystone_authtoken auth_host cloud.cedc.csia.unipd.it | ||
| + | keystone_authtoken auth_protocol https | ||
| + | keystone_authtoken auth_uri https:// | ||
| + | keystone_authtoken cafile / | ||
| + | EOF | ||
| + | </ | ||
| + | |||
| + | Execute this on one controller node only (or where you have the file '' | ||
| + | <code bash> | ||
| + | source ~/ | ||
| + | GLANCE_SERVICE=$(keystone service-get glance | grep ' id ' | awk ' | ||
| + | GLANCE_ENDPOINT=$(keystone endpoint-list | grep $GLANCE_SERVICE|awk ' | ||
| + | keystone endpoint-delete $GLANCE_ENDPOINT | ||
| + | keystone endpoint-create --service glance --publicurl " | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | Restart Glance on both controller nodes: | ||
| + | <code bash> | ||
| + | systemctl restart openstack-glance-api | ||
| + | systemctl restart openstack-glance-registry | ||
| + | </ | ||
| + | ==== Nova ==== | ||
| + | Modify authentication parameters on both controller nodes: | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | keystone_authtoken auth_host cloud.cedc.csia.unipd.it | ||
| + | keystone_authtoken auth_protocol https | ||
| + | keystone_authtoken cafile / | ||
| + | DEFAULT neutron_ca_certificates_file / | ||
| + | DEFAULT cinder_ca_certificates_file / | ||
| + | DEFAULT glance_host cloud.cedc.csia.unipd.it | ||
| + | DEFAULT glance_protocol https | ||
| + | DEFAULT glance_api_servers https:// | ||
| + | DEFAULT glance_api_insecure true | ||
| + | DEFAULT neutron_url https:// | ||
| + | EOF | ||
| + | |||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | </ | ||
| + | On one controller node only (or where you have '' | ||
| + | <code bash> | ||
| + | NOVA_SERVICE=$(keystone service-get nova | grep ' id ' | awk ' | ||
| + | NOVA_ENDPOINT=$(keystone endpoint-list | grep $NOVA_SERVICE|awk ' | ||
| + | keystone endpoint-delete $NOVA_ENDPOINT | ||
| + | keystone endpoint-create --service-id $NOVA_SERVICE --publicurl https:// | ||
| + | |||
| + | NOVAEC2_SERVICE=$(keystone service-get nova_ec2 | grep ' id ' | awk ' | ||
| + | NOVAEC2_ENDPOINT=$(keystone endpoint-list | grep $NOVAEC2_SERVICE|awk ' | ||
| + | keystone endpoint-delete $NOVAEC2_ENDPOINT | ||
| + | keystone endpoint-create --service-id $NOVAEC2_SERVICE --publicurl https:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | Restart Nova on both controller nodes: | ||
| + | <code bash> | ||
| + | systemctl restart openstack-nova-api | ||
| + | systemctl restart openstack-nova-cert | ||
| + | systemctl restart openstack-nova-consoleauth | ||
| + | systemctl restart openstack-nova-scheduler | ||
| + | systemctl restart openstack-nova-conductor | ||
| + | systemctl restart openstack-nova-novncproxy | ||
| + | </ | ||
| + | ==== Neutron ==== | ||
| + | |||
| + | Apply the patches in https:// | ||
| + | |||
| + | Modify authentication parameters | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | keystone_authtoken auth_protocol https | ||
| + | keystone_authtoken auth_host cloud.cedc.csia.unipd.it | ||
| + | keystone_authtoken auth_url https:// | ||
| + | keystone_authtoken auth_uri https:// | ||
| + | keystone_authtoken cafile / | ||
| + | DEFAULT nova_protocol https | ||
| + | DEFAULT nova_url https:// | ||
| + | DEFAULT nova_admin_username nova | ||
| + | #DEFAULT nova_admin_tenant_id=$(keystone tenant-list | awk '/ services / { print$2 }') | ||
| + | DEFAULT nova_admin_tenant_id 1af77118d9db4c9a959810aa7d67c6d8 | ||
| + | DEFAULT nova_admin_password NOVA_PASS | ||
| + | DEFAULT nova_admin_auth_url https:// | ||
| + | DEFAULT nova_ca_certificates_file / | ||
| + | DEFAULT notify_nova_on_port_status_changes True | ||
| + | DEFAULT notify_nova_on_port_data_changes True | ||
| + | EOF | ||
| + | |||
| + | openstack-config --set / | ||
| + | |||
| + | </ | ||
| + | On one controller only (or where you have the '' | ||
| + | <code bash> | ||
| + | NEUTRON_SERVICE=$(keystone service-get neutron | grep ' id ' | awk ' | ||
| + | NEUTRON_ENDPOINT=$(keystone endpoint-list | grep $NEUTRON_SERVICE|awk ' | ||
| + | keystone endpoint-delete $NEUTRON_ENDPOINT | ||
| + | keystone endpoint-create --service-id $NEUTRON_SERVICE --publicurl " | ||
| + | </ | ||
| + | Restart Neutron and Nova on both controller nodes (nova needs to be restarted because its conf file has been changed): | ||
| + | <code bash> | ||
| + | systemctl restart neutron-server | ||
| + | systemctl restart openstack-nova-api | ||
| + | systemctl restart openstack-nova-cert | ||
| + | systemctl restart openstack-nova-consoleauth | ||
| + | systemctl restart openstack-nova-scheduler | ||
| + | systemctl restart openstack-nova-conductor | ||
| + | systemctl restart openstack-nova-novncproxy | ||
| + | </ | ||
| + | ==== Cinder ==== | ||
| + | Modify authentication parameters on both controller nodes: | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | keystone_authtoken auth_host cloud.cedc.csia.unipd.it | ||
| + | keystone_authtoken auth_protocol https | ||
| + | keystone_authtoken auth_uri https:// | ||
| + | keystone_authtoken cafile / | ||
| + | EOF | ||
| + | </ | ||
| + | On one controller only (or where you have the '' | ||
| + | <code bash> | ||
| + | CINDER_SERVICE=$(keystone service-get cinder | grep ' id ' | awk ' | ||
| + | CINDER_ENDPOINT=$(keystone endpoint-list | grep $CINDER_SERVICE|awk ' | ||
| + | keystone endpoint-delete $CINDER_ENDPOINT | ||
| + | CINDER_SERVICE=$(keystone service-get cinderv2 | grep ' id ' | awk ' | ||
| + | CINDER_ENDPOINT=$(keystone endpoint-list | grep $CINDER_SERVICE|awk ' | ||
| + | keystone endpoint-delete $CINDER_ENDPOINT | ||
| + | keystone endpoint-create --service cinder --publicurl https:// | ||
| + | keystone endpoint-create --service cinderv2 --publicurl https:// | ||
| + | </ | ||
| + | Restart Cinder on both controller nodes: | ||
| + | <code bash> | ||
| + | systemctl restart openstack-cinder-api | ||
| + | systemctl restart openstack-cinder-scheduler | ||
| + | </ | ||
| + | ==== Horizon (both controller nodes) ==== | ||
| + | Setup secure connection to Keystone: | ||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | sed -i ' | ||
| + | sed -i 's+# OPENSTACK_SSL_CACERT.*+OPENSTACK_SSL_CACERT="/ | ||
| + | </ | ||
| + | |||
| + | Those two are [[http:// | ||
| + | |||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | sed -i ' | ||
| + | </ | ||
| + | Prepare to patch Horizon' | ||
| + | <code bash> | ||
| + | # | ||
| + | # NOT APPLIED | ||
| + | # Is it still needed? | ||
| + | # | ||
| + | yum install -y patch | ||
| + | curl -o os_auth_patch_01.diff https:// | ||
| + | curl -o os_auth_patch_02.diff https:// | ||
| + | curl -o os_auth_patch_03.diff https:// | ||
| + | patch -R / | ||
| + | patch -R / | ||
| + | patch -R / | ||
| + | |||
| + | </ | ||
| + | |||
| + | Restart apache web server: | ||
| + | <code bash> | ||
| + | systemctl restart httpd | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Integration of INFN-AAI in Keystone (on both controller nodes) ==== | ||
| + | |||
| + | See [[https:// | ||
| + | |||
| + | === === | ||
