progetti:cloud-areapd:egi_federated_cloud:havana-sl6_testbed
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| progetti:cloud-areapd:egi_federated_cloud:havana-sl6_testbed [2015/07/28 08:23] – created verlato@infn.it | progetti:cloud-areapd:egi_federated_cloud:havana-sl6_testbed [2016/02/11 09:21] (current) – verlato@infn.it | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ======Havana-SL6 Testbed ====== | ||
| + | Fully integrated Resource Provider [[https:// | ||
| + | === EGI Monitoring === | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | In case of failures here, check that the user running the Nagios probes is not belonging also to tenants other than EGI_ops | ||
| + | * [[http:// | ||
| + | === Local monitoring === | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | ===== Layout ===== | ||
| + | * Controller + Network node: **egi-cloud.pd.infn.it** | ||
| + | |||
| + | * Compute node: **cloud-01.local**, | ||
| + | |||
| + | * Network layout available [[http:// | ||
| + | |||
| + | |||
| + | ===== Setting up the controller/ | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# rpm -Uvh http:// | ||
| + | [root@egi-cloud ~]# rpm -Uvh http:// | ||
| + | [root@egi-cloud ~]# yum clean all; yum update | ||
| + | [root@egi-cloud ~]# rpm -e --nodeps yum-autoupdate | ||
| + | [root@egi-cloud ~]# yum install -y openvswitch.x86_64 | ||
| + | [root@egi-cloud ~]# yum install -y openstack-neutron-openvswitch.noarch | ||
| + | [root@egi-cloud ~]# yum install -y openstack-packstack | ||
| + | [root@egi-cloud ~]# yum install -y glusterfs-fuse | ||
| + | [root@egi-cloud ~]# cat <<EOF >>/ | ||
| + | 192.168.115.11 cloud-01.local | ||
| + | 192.168.115.12 cloud-02.local | ||
| + | 192.168.115.13 cloud-03.local | ||
| + | 192.168.115.14 cloud-04.local | ||
| + | 192.168.115.15 cloud-05.local | ||
| + | 192.168.115.16 gilda-11.local | ||
| + | EOF | ||
| + | [root@egi-cloud ~]# for i in `seq 11 16`; do ssh-copy-id root@192.168.115.$i; | ||
| + | [root@egi-cloud ~]# reboot | ||
| + | </ | ||
| + | ===== Management/ | ||
| + | |||
| + | * Example of configuring eth1 on OS Compute | ||
| + | <code bash> | ||
| + | [root@cloud-05 ~]# cat / | ||
| + | DEVICE=" | ||
| + | VLAN=" | ||
| + | BOOTPROTO=" | ||
| + | IPADDR=" | ||
| + | NETMASK=" | ||
| + | HWADDR=" | ||
| + | ONBOOT=" | ||
| + | TYPE=" | ||
| + | UUID=" | ||
| + | </ | ||
| + | |||
| + | ===== GlusterFS Configuration ===== | ||
| + | * see [[http:// | ||
| + | * create properly the file / | ||
| + | * if partitions were already created by foreman (as usually is) : | ||
| + | <code bash> | ||
| + | mkdir / | ||
| + | mkdir / | ||
| + | mkdir / | ||
| + | mkdir / | ||
| + | mkdir -p / | ||
| + | mkdir -p / | ||
| + | mkdir -p / | ||
| + | mkdir -p / | ||
| + | yum install glusterfs-server | ||
| + | service glusterd start | ||
| + | # now on cloud-01 only: | ||
| + | gluster volume create novavolume transport tcp 192.168.115.11:/ | ||
| + | gluster volume start novavolume | ||
| + | gluster peer probe 192.168.115.12 | ||
| + | gluster volume add-brick novavolume 192.168.115.12:/ | ||
| + | ... | ||
| + | gluster volume info | ||
| + | cat <<EOF >> /etc/fstab | ||
| + | 192.168.115.11:/ | ||
| + | 192.168.115.11:/ | ||
| + | 192.168.115.11:/ | ||
| + | 192.168.115.11:/ | ||
| + | EOF | ||
| + | mount -a | ||
| + | # the same using 192.168.115.12 on cloud-05 | ||
| + | </ | ||
| + | * Server and bricks on **cloud-01**: | ||
| + | <code bash> | ||
| + | [root@cloud-01 ~]# df -h | ||
| + | Filesystem | ||
| + | / | ||
| + | tmpfs 24G | ||
| + | / | ||
| + | / | ||
| + | 192.168.115.11:/ | ||
| + | 192.168.115.11:/ | ||
| + | 192.168.115.11:/ | ||
| + | 192.168.115.11:/ | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | ===== Installation ===== | ||
| + | |||
| + | * We used the following [[progetti: | ||
| + | |||
| + | * After restarting the network we obtained: | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# ifconfig | ||
| + | br-ext | ||
| + | inet addr: | ||
| + | inet6 addr: fe80:: | ||
| + | UP BROADCAST RUNNING | ||
| + | RX packets: | ||
| + | TX packets: | ||
| + | collisions: | ||
| + | RX bytes: | ||
| + | |||
| + | br-int | ||
| + | inet6 addr: fe80:: | ||
| + | UP BROADCAST RUNNING | ||
| + | RX packets: | ||
| + | TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 | ||
| + | collisions: | ||
| + | RX bytes: | ||
| + | |||
| + | br-tun | ||
| + | inet6 addr: fe80:: | ||
| + | UP BROADCAST RUNNING | ||
| + | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 | ||
| + | TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 | ||
| + | collisions: | ||
| + | RX bytes:0 (0.0 b) TX bytes:468 (468.0 b) | ||
| + | |||
| + | eth0 Link encap: | ||
| + | inet6 addr: fec0:: | ||
| + | inet6 addr: 2002: | ||
| + | inet6 addr: fe80:: | ||
| + | UP BROADCAST RUNNING MULTICAST | ||
| + | RX packets: | ||
| + | TX packets: | ||
| + | collisions: | ||
| + | RX bytes: | ||
| + | |||
| + | eth0.19 | ||
| + | inet addr: | ||
| + | inet6 addr: fe80:: | ||
| + | UP BROADCAST RUNNING MULTICAST | ||
| + | RX packets: | ||
| + | TX packets: | ||
| + | collisions: | ||
| + | RX bytes: | ||
| + | |||
| + | eth0.303 | ||
| + | inet6 addr: fe80:: | ||
| + | UP BROADCAST RUNNING MULTICAST | ||
| + | RX packets: | ||
| + | TX packets: | ||
| + | collisions: | ||
| + | RX bytes: | ||
| + | |||
| + | lo Link encap:Local Loopback | ||
| + | inet addr: | ||
| + | inet6 addr: ::1/128 Scope:Host | ||
| + | UP LOOPBACK RUNNING | ||
| + | RX packets: | ||
| + | TX packets: | ||
| + | collisions: | ||
| + | RX bytes: | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# ovs-vsctl show | ||
| + | eb703996-b13c-422a-bcfc-efd331a7a0ca | ||
| + | Bridge br-int | ||
| + | Port " | ||
| + | tag: 1 | ||
| + | Interface " | ||
| + | type: internal | ||
| + | Port " | ||
| + | tag: 2 | ||
| + | Interface " | ||
| + | type: internal | ||
| + | Port br-int | ||
| + | Interface br-int | ||
| + | type: internal | ||
| + | Port patch-tun | ||
| + | Interface patch-tun | ||
| + | type: patch | ||
| + | options: {peer=patch-int} | ||
| + | Port " | ||
| + | tag: 1 | ||
| + | Interface " | ||
| + | type: internal | ||
| + | Port " | ||
| + | tag: 2 | ||
| + | Interface " | ||
| + | type: internal | ||
| + | Bridge br-ext | ||
| + | Port br-ext | ||
| + | Interface br-ext | ||
| + | type: internal | ||
| + | Port " | ||
| + | Interface " | ||
| + | Port " | ||
| + | Interface " | ||
| + | type: internal | ||
| + | Port " | ||
| + | Interface " | ||
| + | type: internal | ||
| + | Bridge br-tun | ||
| + | Port br-tun | ||
| + | Interface br-tun | ||
| + | type: internal | ||
| + | Port " | ||
| + | Interface " | ||
| + | type: gre | ||
| + | options: {in_key=flow, | ||
| + | Port patch-int | ||
| + | Interface patch-int | ||
| + | type: patch | ||
| + | options: {peer=patch-tun} | ||
| + | Port " | ||
| + | Interface " | ||
| + | type: gre | ||
| + | options: {in_key=flow, | ||
| + | ovs_version: | ||
| + | </ | ||
| + | * We had to put CONFIG_SWIFT_INSTALL=n in order to complete successfully the installation with packstack, due to not yet understood problems related to Swift. | ||
| + | |||
| + | ===== OpenStack configuration ===== | ||
| + | |||
| + | * We stopped following the [[progetti: | ||
| + | {{: | ||
| + | * As an example, here below are reported the commands for creating the router and attaching to it the wenmr net: | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# source keystonerc_admin | ||
| + | [root@egi-cloud ~]# neutron router-create ext-to-vos | ||
| + | [root@egi-cloud ~]# tenant=$(keystone tenant-list | awk '/ | ||
| + | [root@egi-cloud ~]# neutron net-create int-wenmr --router: | ||
| + | [root@egi-cloud ~]# neutron subnet-create int-wenmr 10.0.3.0/24 --enable-dhcp=True --dns-nameserver 192.84.143.16 --allocation-pool start=10.0.3.2, | ||
| + | --gateway=10.0.3.1 --name int-sub-wenmr --tenant_id $tenant | ||
| + | [root@egi-cloud ~]# neutron router-interface-add ext-to-vos int-sub-wenmr | ||
| + | </ | ||
| + | * According to this [[https:// | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# source keystonerc_admin | ||
| + | [root@egi-cloud ~]# keystone role-create --name=" | ||
| + | [root@egi-cloud ~]# keystone role-create --name accounting | ||
| + | [root@egi-cloud ~]# keystone user-create --name accounting --pass < | ||
| + | # For each of the tenants, add the user with the accounting role | ||
| + | [root@egi-cloud ~]# keystone user-role-add --user accounting --role accounting --tenant < | ||
| + | </ | ||
| + | * Add the following user/role: admin/ | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# keystone user-role-add --user admin --role Member --tenant < | ||
| + | </ | ||
| + | * Do not forget to add the new tenant to the / | ||
| + | * Remove “metadata” from “enabled_apis” as suggested in this [[progetti: | ||
| + | * Set the variables enable_isolated_metadata = True and enable_metadata_network = True in / | ||
| + | * Doing "yum install -y sheepdog" | ||
| + | * Change MTU value to 1400 for all VMs by adding the line " | ||
| + | * Enable VNC on compute nodes (if not set in the packstack answers file): | ||
| + | <code bash> | ||
| + | [root@cloud-01, | ||
| + | </ | ||
| + | * Set on all nodes the right libvirt_vif_driver: | ||
| + | <code bash> | ||
| + | [root@egi-cloud, | ||
| + | </ | ||
| + | ===== EGI FedCloud specific configuration ===== | ||
| + | |||
| + | (see [[https:// | ||
| + | |||
| + | * Install CAs Certificates and the software for fetching the CRLs in both Controller (egi-cloud) and Compute (cloud-01, | ||
| + | <code bash> | ||
| + | [root@egi-cloud, | ||
| + | [root@egi-cloud, | ||
| + | [EGI-trustanchors] | ||
| + | name=EGI-trustanchors | ||
| + | baseurl=http:// | ||
| + | gpgkey=http:// | ||
| + | gpgcheck=1 | ||
| + | enabled=1 | ||
| + | EOF | ||
| + | [root@egi-cloud, | ||
| + | [root@egi-cloud, | ||
| + | [root@egi-cloud, | ||
| + | [root@egi-cloud, | ||
| + | </ | ||
| + | |||
| + | ==== Install the OCCI API ==== | ||
| + | |||
| + | (only on Controller node) | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# yum install -y python-pip.noarch git | ||
| + | [root@egi-cloud ~]# pip install pyssf | ||
| + | [root@egi-cloud ~]# git config --global http.sslverify false | ||
| + | [root@egi-cloud ~]# git clone https:// | ||
| + | [root@egi-cloud ~]# cd occi-os/ | ||
| + | [root@egi-cloud occi-os]# git checkout stable/ | ||
| + | [root@egi-cloud occi-os]# python setup.py install | ||
| + | [root@egi-cloud ~]# cat <<EOF >>/ | ||
| + | ######## | ||
| + | # OCCI # | ||
| + | ######## | ||
| + | |||
| + | [composite: | ||
| + | use = egg: | ||
| + | /: occiapppipe | ||
| + | |||
| + | [pipeline: | ||
| + | pipeline = authtoken keystonecontext occiapp | ||
| + | # with request body size limiting and rate limiting | ||
| + | # pipeline = sizelimit authtoken keystonecontext ratelimit occiapp | ||
| + | |||
| + | [app: | ||
| + | use = egg: | ||
| + | EOF | ||
| + | </ | ||
| + | * Make sure the API occiapi is enabled in the / | ||
| + | <code bash> | ||
| + | [...] | ||
| + | enabled_apis=ec2, | ||
| + | occiapi_listen_port=9000 | ||
| + | </ | ||
| + | * Add this line in / | ||
| + | <code bash> | ||
| + | default_floating_pool=ext-net | ||
| + | </ | ||
| + | * modify the / | ||
| + | <code bash> | ||
| + | [root@egi-cloud]# | ||
| + | [root@egi-cloud]# | ||
| + | [root@egi-cloud]# | ||
| + | </ | ||
| + | * and restart the opestack-nova-* services: | ||
| + | <code bash> | ||
| + | [root@egi-cloud]# | ||
| + | [root@egi-cloud]# | ||
| + | </ | ||
| + | * Enable SSL connection on port 8787, by creating the file / | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# yum install mod_ssl | ||
| + | [root@egi-cloud ~]# cat / | ||
| + | # | ||
| + | # Proxy Server directives. Uncomment the following lines to | ||
| + | # enable the proxy server: | ||
| + | LoadModule proxy_module / | ||
| + | LoadModule proxy_http_module / | ||
| + | LoadModule substitute_module / | ||
| + | LoadModule filter_module / | ||
| + | |||
| + | Listen 8787 | ||
| + | < | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | < | ||
| + | # Do not enable proxying with ProxyRequests until you have secured # your | ||
| + | server. | ||
| + | # Open proxy servers are dangerous both to your network and to the | ||
| + | # Internet at large. | ||
| + | | ||
| + | |||
| + | < | ||
| + | Order deny, | ||
| + | Deny from all | ||
| + | # | ||
| + | </ | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | < | ||
| + | # | ||
| + | | ||
| + | | ||
| + | Order allow, | ||
| + | Allow from all | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Configure VO parameters for Keystone ==== | ||
| + | |||
| + | |||
| + | * Create the VO/ | ||
| + | <code bash> | ||
| + | [root@egi-cloud]# | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | } | ||
| + | EOF | ||
| + | </ | ||
| + | * To accept VOMS proxy certificates for VOs fedcloud.egi.eu and ops, the | ||
| + | following directories/ | ||
| + | <code bash> | ||
| + | [root@egi-cloud]# | ||
| + | [root@egi-cloud]# | ||
| + | |||
| + | [root@egi-cloud]# | ||
| + | / | ||
| + | / | ||
| + | EOF | ||
| + | [root@egi-cloud]# | ||
| + | / | ||
| + | / | ||
| + | EOF | ||
| + | [root@egi-cloud]# | ||
| + | / | ||
| + | / | ||
| + | EOF | ||
| + | [root@egi-cloud]# | ||
| + | / | ||
| + | / | ||
| + | EOF | ||
| + | </ | ||
| + | * VOMS configuration options to be configured in / | ||
| + | <code bash> | ||
| + | [root@egi-cloud]# | ||
| + | [voms] | ||
| + | vomsdir_path = / | ||
| + | ca_path = / | ||
| + | voms_policy = / | ||
| + | vomsapi_lib = libvomsapi.so.1 | ||
| + | autocreate_users = True | ||
| + | EOF | ||
| + | </ | ||
| + | * Check and in case install the host certificate for your server in / | ||
| + | <code bash> | ||
| + | [root@egi-cloud]# | ||
| + | -rw-r--r-- 1 root root 1424 Feb 25 15:19 / | ||
| + | -r-------- 1 root root 887 Feb 25 15:19 / | ||
| + | </ | ||
| + | |||
| + | ==== Install OpenStack Keystone-VOMS module ==== | ||
| + | |||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# yum -y install voms m2crypto | ||
| + | [root@egi-cloud ~]# git clone git:// | ||
| + | [root@egi-cloud ~]# cd keystone-voms/ | ||
| + | [root@egi-cloud keystone-voms]# | ||
| + | </ | ||
| + | * Enable the Keystone VOMS module | ||
| + | <code bash> | ||
| + | [root@egi-cloud]# | ||
| + | |||
| + | - replace the line "# | ||
| + | |||
| + | - add the VOMS filter in / | ||
| + | [filter: | ||
| + | paste.filter_factory = keystone_voms: | ||
| + | |||
| + | - add the VOMS filter to the public_api pipeline in / | ||
| + | [pipeline: | ||
| + | pipeline = access_log sizelimit url_normalize token_auth admin_token_auth xml_body json_body voms ec2_extension user_crud_extension public_service | ||
| + | |||
| + | - disable the plain keystone: | ||
| + | [root@egi-cloud]# | ||
| + | [root@egi-cloud]# | ||
| + | </ | ||
| + | * Configuring keystone SSL support | ||
| + | <code bash> | ||
| + | - enable SSL with client authentication in / | ||
| + | [ssl] | ||
| + | enable = True | ||
| + | certfile = / | ||
| + | keyfile = / | ||
| + | ca_certs = / | ||
| + | cert_required = False | ||
| + | - add the SSL enabled keystone URL in / | ||
| + | [filter: | ||
| + | auth_uri=https:// | ||
| + | </ | ||
| + | * Configuring the Apache server: create the file / | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# cat / | ||
| + | WSGIDaemonProcess keystone user=keystone group=nobody processes=3 threads=10 | ||
| + | Listen 5000 | ||
| + | < | ||
| + | LogLevel | ||
| + | ErrorLog | ||
| + | CustomLog | ||
| + | |||
| + | SSLEngine | ||
| + | SSLCertificateFile | ||
| + | SSLCertificateKeyFile | ||
| + | SSLCACertificatePath | ||
| + | SSLCARevocationPath | ||
| + | SSLVerifyClient | ||
| + | SSLVerifyDepth | ||
| + | SSLProtocol | ||
| + | SSLCipherSuite | ||
| + | SSLOptions | ||
| + | |||
| + | WSGIScriptAlias / / | ||
| + | WSGIProcessGroup keystone | ||
| + | </ | ||
| + | |||
| + | Listen 35357 | ||
| + | < | ||
| + | LogLevel | ||
| + | ErrorLog | ||
| + | CustomLog | ||
| + | |||
| + | SSLEngine | ||
| + | SSLCertificateFile | ||
| + | SSLCertificateKeyFile | ||
| + | SSLCACertificatePath | ||
| + | SSLCARevocationPath | ||
| + | SSLVerifyClient | ||
| + | SSLVerifyDepth | ||
| + | SSLProtocol | ||
| + | SSLCipherSuite | ||
| + | SSLOptions | ||
| + | |||
| + | WSGIScriptAlias | ||
| + | WSGIProcessGroup | ||
| + | </ | ||
| + | </ | ||
| + | * Do not forget to uncomment the log_file line in keystone.conf, | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]#sed -i 's|# log_file = / | ||
| + | </ | ||
| + | * Run keystone as WSGI application | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# yum -y install python-paste-deploy | ||
| + | [root@egi-cloud ~]# mkdir -p / | ||
| + | [root@egi-cloud ~]# cp / | ||
| + | [root@egi-cloud ~]# cp / | ||
| + | </ | ||
| + | * Add the OPENSSL_ALLOW_PROXY_CERTS attribute in / | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# cat / | ||
| + | [...] | ||
| + | # Start httpd in the C locale by default. | ||
| + | export OPENSSL_ALLOW_PROXY_CERTS=1 | ||
| + | HTTPD_LANG=${HTTPD_LANG-" | ||
| + | [...] | ||
| + | |||
| + | [root@egi-cloud ~]# service httpd restart | ||
| + | </ | ||
| + | * Adjust manually the keystone catalog in order the identity backend points to the correct URLs: | ||
| + | * public URL: https:// | ||
| + | * admin URL: https:// | ||
| + | * internal URL: https:// | ||
| + | <code bash> | ||
| + | mysql> use keystone; | ||
| + | mysql> update endpoint set url=" | ||
| + | mysql> update endpoint set url=" | ||
| + | mysql> select id,url from endpoint; | ||
| + | should show lines with the above URLs. | ||
| + | </ | ||
| + | * Replace http with https in auth_[protocol, | ||
| + | * Replace http with https in auth_[protocol, | ||
| + | * Comment the RedirecMatch line in / | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# mv / | ||
| + | </ | ||
| + | * Replace http with https in OPENSTACK_KEYSTONE_URL variable and put egi-cloud.pd.infn.it in OPENSTACK_HOST variable of / | ||
| + | * Do the following in both Controller and Compute nodes (it seems ca-bundle.crt is hardcoded in / | ||
| + | <code bash> | ||
| + | [root@egi-cloud, | ||
| + | [root@egi-cloud, | ||
| + | </ | ||
| + | * A more elegant solution is the following (see [[http:// | ||
| + | <code bash> | ||
| + | [root@egi-cloud, | ||
| + | [root@egi-cloud, | ||
| + | [root@egi-cloud, | ||
| + | </ | ||
| + | ==== Install rOCCI Client ==== | ||
| + | * We installed the rOCCI client on top of a EMI UI with small changes from this [[https:// | ||
| + | <code bash> | ||
| + | [root@prod-ui-02]# | ||
| + | [root@prod-ui-02]# | ||
| + | [root@prod-ui-02]# | ||
| + | [root@prod-ui-02]# | ||
| + | </ | ||
| + | * As a normal user, an example of usage with basic commands is: | ||
| + | <code bash> | ||
| + | # create ssh-key for accessing VM as cloudadm: | ||
| + | [prod-ui-02]# | ||
| + | [prod-ui-02]# | ||
| + | # | ||
| + | users: | ||
| + | - name: cloudadm | ||
| + | sudo: ALL=(ALL) NOPASSWD: | ||
| + | lock-passwd: | ||
| + | ssh-import-id: | ||
| + | ssh-authorized-keys: | ||
| + | - `cat tmpfedcloud.pub` | ||
| + | EOF | ||
| + | |||
| + | # create your VOMS proxy: | ||
| + | [prod-ui-02]# | ||
| + | ... | ||
| + | |||
| + | # query the Cloud provider to see what is available (flavors and images): | ||
| + | [prod-ui-02]# | ||
| + | ##################################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ##################################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ##################################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ##################################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ##################################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ##################################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ##################################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ##################################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: hpc | ||
| + | location: | ||
| + | ##################################################################################################################### | ||
| + | |||
| + | [prod-ui-02]# | ||
| + | ########################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ########################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ########################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ########################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ########################################################################################################### | ||
| + | [[ http:// | ||
| + | title: | ||
| + | term: | ||
| + | location: | ||
| + | ########################################################################################################### | ||
| + | # | ||
| + | # create a VM of " | ||
| + | [prod-ui-02]# | ||
| + | https:// | ||
| + | # | ||
| + | # assign a floating-ip to the VM: | ||
| + | [prod-ui-02]# | ||
| + | # | ||
| + | # discover the floating-ip assigned: | ||
| + | [prod-ui-02]# | ||
| + | ... | ||
| + | occi.networkinterface.address = 90.147.77.226 | ||
| + | occi.core.target = / | ||
| + | occi.core.source = / | ||
| + | occi.core.id = / | ||
| + | ... | ||
| + | # | ||
| + | # access the VM via ssh: | ||
| + | [prod-ui-02]# | ||
| + | Enter passphrase for key ' | ||
| + | Welcome to Ubuntu 14.04 | ||
| + | ... | ||
| + | </ | ||
| + | ==== Install FedCloud BDII ==== | ||
| + | * See the guide [[https:// | ||
| + | * Add EPEL repository according to the instructions at https:// | ||
| + | * Add the cloud-info-provider repository to yum and install the service (it includes the resource bdii): | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# wget http:// | ||
| + | -O / | ||
| + | [root@egi-cloud ~]# yum install cloud-info-provider-service | ||
| + | </ | ||
| + | * Customize the configuration file with the local sites' infos | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | </ | ||
| + | * Use one of the template files in / | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# cp / | ||
| + | </ | ||
| + | * Edit the / | ||
| + | * Site name will be fetched from site -> name in the template file. Set it to the name defined in GOCDB. Alternatively, | ||
| + | * Be sure that keystone contains the OCCI endpoint, otherwise it will not be published by the BDII: | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# keystone service-list | ||
| + | [root@egi-cloud ~]# keystone service-create --name nova-occi --type occi --description 'Nova OCCI Service' | ||
| + | [root@egi-cloud ~]# keystone endpoint-create --service_id <the one obtained above> --region RegionOne --publicurl https:// | ||
| + | </ | ||
| + | * By default, the provider script will filter images without marketplace uri defined into the marketplace or vmcatcher_event_ad_mpuri property. If you want to list all the images templates (included local snapshots), set the variable ' | ||
| + | * Create the file / | ||
| + | <code bash> | ||
| + | #!/bin/sh | ||
| + | |||
| + | cloud-info-provider-service --yaml / | ||
| + | --middleware openstack \ | ||
| + | --os-username < | ||
| + | --os-tenant-name < | ||
| + | </ | ||
| + | * Run manually the cloud-info-provider script and check that the output retunr the complete LDIF. To do so, execute: | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# chmod +x / | ||
| + | [root@egi-cloud ~]# / | ||
| + | </ | ||
| + | * Now you can start the bdii service: | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# service bdii start | ||
| + | </ | ||
| + | * Use the command below to see if the information is being published: | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# ldapsearch -x -h localhost -p 2170 -b o=glue | ||
| + | </ | ||
| + | * Information on how to set up the site-BDII in egi-cloud-sbdii.pd.infn.it is available [[https:// | ||
| + | * Add your cloud-info-provider to your site-BDII egi-cloud-sbdii.pd.infn.it by adding new lines in the site.def like this: | ||
| + | <code bash> | ||
| + | BDII_REGIONS=" | ||
| + | BDII_CLOUD_URL=" | ||
| + | BDII_BDII_URL=" | ||
| + | </ | ||
| + | ==== Install vmcatcher/ | ||
| + | * VMcatcher allows users to subscribe to virtual machine Virtual Machine image lists, cache the images referenced to in the Virtual Machine Image List, validate the images list with x509 based public key cryptography, | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# useradd stack | ||
| + | [root@egi-cloud ~]# cat << EOF > / | ||
| + | [yokel_scientific_release_6] | ||
| + | name=yokel_scientific_release_6 | ||
| + | baseurl=http:// | ||
| + | enabled=1 | ||
| + | gpgcheck=0 | ||
| + | EOF | ||
| + | [root@egi-cloud ~]# yum install vmcatcher gpvcmupdate python-glancepush | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | # use gluster storage for caching images and tmp files | ||
| + | [root@egi-cloud ~]# ln -fs / | ||
| + | # | ||
| + | [root@egi-cloud ~]# mkdir -p / | ||
| + | [root@egi-cloud ~]# chown stack:stack / | ||
| + | [root@egi-cloud ~]# mkdir -p / | ||
| + | [root@egi-cloud ~]# cp / | ||
| + | [root@egi-cloud ~]# chown stack:stack -R / | ||
| + | </ | ||
| + | * Now for each VO/tenant you have in voms.json write a file like this: | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# su - stack | ||
| + | [stack@egi-cloud ~]# cat << EOF > / | ||
| + | [general] | ||
| + | # Tenant for this VO. Must match the tenant defined in voms.json file | ||
| + | testing_tenant=EGI_dteam | ||
| + | # Identity service endpoint (Keystone) | ||
| + | endpoint_url=https:// | ||
| + | # User Password | ||
| + | password=xxxxx | ||
| + | # User | ||
| + | username=admin | ||
| + | # Set this to true if you're NOT using self-signed certificates | ||
| + | is_secure=True | ||
| + | # SSH private key that will be used to perform policy checks (to be done) | ||
| + | # | ||
| + | # WARNING: Only define the next variable if you're going to need it. Otherwise you may encounter problems | ||
| + | # | ||
| + | EOF | ||
| + | </ | ||
| + | * and for images not belonging to any VO use the admin tenant | ||
| + | <code bash> | ||
| + | [stack@egi-cloud ~]# cat << EOF > / | ||
| + | [general] | ||
| + | # Tenant for this VO. Must match the tenant defined in voms.json file | ||
| + | testing_tenant=admin | ||
| + | # Identity service endpoint (Keystone) | ||
| + | endpoint_url=https:// | ||
| + | # User Password | ||
| + | password=xxxxx | ||
| + | # User | ||
| + | username=admin | ||
| + | # Set this to true if you're NOT using self-signed certificates | ||
| + | is_secure=True | ||
| + | # SSH private key that will be used to perform policy checks (to be done) | ||
| + | # | ||
| + | # WARNING: Only define the next variable if you're going to need it. Otherwise you may encounter problems | ||
| + | # | ||
| + | EOF | ||
| + | </ | ||
| + | * Check that vmcatcher is running properly by listing and subscribing to an image list | ||
| + | <code bash> | ||
| + | [stack@egi-cloud ~]# export VMCATCHER_RDBMS=" | ||
| + | [stack@egi-cloud ~]# vmcatcher_subscribe -l | ||
| + | [stack@egi-cloud ~]# vmcatcher_subscribe -e -s https:// | ||
| + | [stack@egi-cloud ~]# vmcatcher_subscribe -l | ||
| + | 8ddbd4f6-fb95-4917-b105-c89b5df99dda | ||
| + | </ | ||
| + | * Create a CRON wrapper for vmcatcher, named $HOME/ | ||
| + | <code bash> | ||
| + | #!/bin/bash | ||
| + | #Cron handler for VMCatcher image syncronization script for OpenStack | ||
| + | |||
| + | #Vmcatcher configuration variables | ||
| + | export VMCATCHER_RDBMS=" | ||
| + | export VMCATCHER_CACHE_DIR_CACHE="/ | ||
| + | export VMCATCHER_CACHE_DIR_DOWNLOAD="/ | ||
| + | export VMCATCHER_CACHE_DIR_EXPIRE="/ | ||
| + | export VMCATCHER_CACHE_EVENT=" | ||
| + | |||
| + | #Update vmcatcher image lists | ||
| + | vmcatcher_subscribe -U | ||
| + | |||
| + | #Add all the new images to the cache | ||
| + | for a in `vmcatcher_image -l | awk '{if ($2==2) print $1}'`; do | ||
| + | vmcatcher_image -a -u $a | ||
| + | done | ||
| + | |||
| + | #Update the cache | ||
| + | vmcatcher_cache -v -v | ||
| + | |||
| + | #Run glancepush | ||
| + | python / | ||
| + | </ | ||
| + | * Test that the vmcatcher handler is working correctly by running: | ||
| + | <code bash> | ||
| + | [stack@egi-cloud ~]# chmod +x $HOME/ | ||
| + | [stack@egi-cloud ~]# $HOME/ | ||
| + | </ | ||
| + | * Add the following line to the stack user crontab: | ||
| + | <code bash> | ||
| + | 50 */6 * * * $HOME/ | ||
| + | </ | ||
| + | * Useful links for getting VO-wide image lists that need authentication to AppDB: [[https:// | ||
| + | ==== Install APEL/SSM ==== | ||
| + | * Following instructions [[https:// | ||
| + | <code bash> | ||
| + | # wget rpms from http:// | ||
| + | [root@egi-cloud ~]# useradd apel | ||
| + | [root@egi-cloud ~]# yum localinstall apel-ssm-2.1.1-0.el6.noarch.rpm apel-client-1.1.3-0.el6.noarch.rpm apel-lib-1.1.3-0.el6.noarch.rpm | ||
| + | [root@egi-cloud ~]# wget ftp:// | ||
| + | [root@egi-cloud ~]# yum localinstall apel-ssm-openstack-latest.noarch.rpm | ||
| + | [root@egi-cloud ~]# mkdir / | ||
| + | [root@egi-cloud ~]# cp / | ||
| + | [root@egi-cloud ~]# chown -R apel.apel / | ||
| + | [root@egi-cloud ~]# chown apel.apel / | ||
| + | [root@egi-cloud ~]# chown apel.apel / | ||
| + | </ | ||
| + | * create from the OpenStack dashboard the user " | ||
| + | * change files / | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | # this below is a temporary workaroud (27/5/2014) | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | # | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | [root@egi-cloud ~]# sed -i ' | ||
| + | </ | ||
| + | * apply the fix described [[https:// | ||
| + | < | ||
| + | [root@egi-cloud ~]# sed -i " | ||
| + | </ | ||
| + | * records' | ||
| + | * create or destroy some VMs, then check that files in / | ||
| + | < | ||
| + | [root@egi-cloud ~]# su - apel | ||
| + | [apel@egi-cloud ~]$ / | ||
| + | [apel@egi-cloud ~]$ ll / | ||
| + | total 4 | ||
| + | -rw-rw-r-- 1 apel apel 17848 May 27 12:33 servers | ||
| + | -rw-rw-r-- 1 apel apel 0 May 27 12:32 timestamp | ||
| + | [apel@egi-cloud ~]$ / | ||
| + | [apel@egi-cloud ~]$ ll / | ||
| + | total 8 | ||
| + | drwxrwxr-x 2 apel apel 4096 May 27 12:17 5384643c | ||
| + | drwxrwxr-x 2 apel apel 4096 May 27 12:34 538469dc | ||
| + | |||
| + | </ | ||
| + | * execute the command for sending the accounting data to GOCDB. After that, enable it as cron job in / | ||
| + | <code bash> | ||
| + | [apel@egi-cloud ~]$ ssmsend | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | 2014-05-27 12: | ||
| + | # | ||
| + | [root@egi-cloud ~]# chkconfig osssm on | ||
| + | [root@egi-cloud ~]# service osssm start | ||
| + | </ | ||
| + | ==== Install the new accounting system (CASO) ==== | ||
| + | * Following instructions [[https:// | ||
| + | * At first, install Python2.7 (see [[http:// | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# yum groupinstall " | ||
| + | [root@egi-cloud ~]# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel | ||
| + | [root@egi-cloud ~]# echo "/ | ||
| + | [root@egi-cloud ~]# wget http:// | ||
| + | [root@egi-cloud ~]# tar xf Python-2.7.9.tar.xz; | ||
| + | [root@egi-cloud ~]# ./configure --prefix=/ | ||
| + | [root@egi-cloud ~]# make && make altinstall | ||
| + | </ | ||
| + | * Download and install Setuptools + pip: | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# wget https:// | ||
| + | [root@egi-cloud ~]# python2.7 ez_setup.py | ||
| + | [root@egi-cloud ~]# easy_install-2.7 pip | ||
| + | </ | ||
| + | * Now install virtualenvrapper for Python 2.7: | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]$ pip2.7 install virtualenvwrapper | ||
| + | [root@egi-cloud ~]$ cat >> .bashrc << EOF | ||
| + | export VIRTUALENVWRAPPER_PYTHON=/ | ||
| + | export USR_BIN=$(dirname $(which virtualenv)) | ||
| + | if [ -f $USR_BIN/ | ||
| + | source $USR_BIN/ | ||
| + | else | ||
| + | if [ -f / | ||
| + | source / | ||
| + | else | ||
| + | echo " | ||
| + | fi | ||
| + | fi | ||
| + | EOF | ||
| + | [root@egi-cloud ~]$ source .bashrc | ||
| + | </ | ||
| + | * And now install CASO: | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]$ mkvirtualenv caso | ||
| + | [root@egi-cloud ~]$ pip install caso | ||
| + | </ | ||
| + | * Copy the CA certs bundle in the right place | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# cd / | ||
| + | [root@egi-cloud ~]# cp / | ||
| + | [root@egi-cloud ~]# mv cacert.pem cacert.pem.bak; | ||
| + | </ | ||
| + | * Configure / | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]$ mkdir / | ||
| + | [root@egi-cloud ~]$ workon caso | ||
| + | [root@egi-cloud ~]$ caso-extract -v -d | ||
| + | </ | ||
| + | * Create the cron job | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# cat / | ||
| + | # extract and send usage records to APEL/ | ||
| + | 10 * * * * root / | ||
| + | |||
| + | # send buffered usage records to GOC | ||
| + | 30 */24 * * * apel / | ||
| + | </ | ||
| + | ==== Troubleshooting ==== | ||
| + | * In order to allow cld-nagios to access egi-cloud.local, | ||
| + | <code bash> | ||
| + | [root@egi-cloud ~]# echo " | ||
| + | [root@cloud-01, | ||
| + | </ | ||
| + | * Also allow passwordless ssh access to egi-cloud from cld-nagios: | ||
| + | <code bash> | ||
| + | [root@cld-nagios ~]# ssh-keygen -t rsa | ||
| + | [root@cld-nagios ~]# ssh-copy-id egi-cloud.local | ||
| + | < | ||
| + | * In case of Nagios alarms, try the following: | ||
| + | <code bash> | ||
| + | $ ssh root@egi-cloud | ||
| + | [root@egi-cloud ~]# ./ | ||
| + | [root@egi-cloud ~]# for i in cloud-01.local cloud-05.local gilda-11.local; | ||
| + | </ | ||
| + | * Resubmit the Nagios probe and check if it works again | ||
