progetti:cloud-areapd:egi_federated_cloud:synergy:for_juno-ubuntu1404
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| progetti:cloud-areapd:egi_federated_cloud:synergy:for_juno-ubuntu1404 [2015/09/03 14:53] – created verlato@infn.it | progetti:cloud-areapd:egi_federated_cloud:synergy:for_juno-ubuntu1404 [2015/09/08 15:20] (current) – fanzago@infn.it | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Synergy on Juno-Ubuntu1404 ====== | ||
| + | |||
| + | How to install synergy on the controller: | ||
| + | |||
| + | cd / | ||
| + | |||
| + | scp blade-03-06.pn.pd.infn.it:/ | ||
| + | |||
| + | cp synergy.tar / | ||
| + | |||
| + | cd / | ||
| + | |||
| + | tar xvf synergy.tar | ||
| + | |||
| + | cd synergy | ||
| + | |||
| + | |||
| + | |||
| + | apt-get install python-mysql.connector | ||
| + | |||
| + | apt-get install python-dateutil | ||
| + | |||
| + | |||
| + | |||
| + | useradd -r synergy | ||
| + | |||
| + | |||
| + | |||
| + | cp script/ | ||
| + | |||
| + | chmod a+r / | ||
| + | |||
| + | |||
| + | cp scripts/ | ||
| + | |||
| + | chmod 755 / | ||
| + | |||
| + | |||
| + | mkdir -p / | ||
| + | |||
| + | chown -R synergy: | ||
| + | |||
| + | |||
| + | mkdir -p / | ||
| + | |||
| + | chown -R synergy: | ||
| + | |||
| + | |||
| + | mkdir -p / | ||
| + | |||
| + | |||
| + | chown -R synergy: | ||
| + | |||
| + | |||
| + | chmod 755 -R /etc/nova/ | ||
| + | |||
| + | |||
| + | cp config/ | ||
| + | |||
| + | chown -R synergy: | ||
| + | |||
| + | |||
| + | source / | ||
| + | |||
| + | keystone user-create --name synergy --tenant service --pass synergy | ||
| + | +----------+----------------------------------+ | ||
| + | | Property | Value | | ||
| + | +----------+----------------------------------+ | ||
| + | | email | ||
| + | | enabled | ||
| + | | id | a440033c786541e88d934e742ab9b726 | | ||
| + | | | ||
| + | | tenantId | 7a61af419ac543a4800eb52ac41d4d3c | | ||
| + | | username | | ||
| + | +----------+----------------------------------+ | ||
| + | |||
| + | |||
| + | keystone user-role-add --user synergy --tenant service --role admin | ||
| + | |||
| + | |||
| + | root@egi-cloud:/ | ||
| + | +-------------+----------------------------------+ | ||
| + | | | ||
| + | +-------------+----------------------------------+ | ||
| + | | description | | | ||
| + | | | ||
| + | | id | 090b366a63e5464e85900fa89c9752cb | | ||
| + | | | ||
| + | | | ||
| + | +-------------+----------------------------------+ | ||
| + | |||
| + | |||
| + | keystone endpoint-create --service 090b366a63e5464e85900fa89c9752cb --publicurl http:// | ||
| + | |||
| + | root@egi-cloud:/ | ||
| + | |||
| + | --- | ||
| + | |||
| + | mysql -u root -p < | ||
| + | |||
| + | mysql> CREATE DATABASE synergy; | ||
| + | |||
| + | Query OK, 1 row affected (0.01 sec) | ||
| + | |||
| + | |||
| + | mysql> GRANT ALL PRIVILEGES ON synergy.* TO ' | ||
| + | |||
| + | Query OK, 0 rows affected (0.11 sec) | ||
| + | |||
| + | |||
| + | mysql> GRANT ALL PRIVILEGES ON synergy.* TO ' | ||
| + | |||
| + | Query OK, 0 rows affected (0.00 sec) | ||
| + | |||
| + | |||
| + | mysql> GRANT ALL PRIVILEGES ON nova.* TO ' | ||
| + | |||
| + | Query OK, 0 rows affected (0.11 sec) | ||
| + | |||
| + | |||
| + | mysql> GRANT ALL PRIVILEGES ON nova.* TO ' | ||
| + | |||
| + | Query OK, 0 rows affected (0.00 sec) | ||
| + | |||
| + | |||
| + | mysql> commit; | ||
| + | |||
| + | Query OK, 0 rows affected (0.00 sec) | ||
| + | |||
| + | |||
| + | mysql> quit; | ||
| + | |||
| + | --- | ||
| + | |||
| + | in / | ||
| + | |||
| + | notify_on_state_change = vm_state | ||
| + | |||
| + | notification_driver = nova.openstack.common.notifier.rpc_notifier | ||
| + | |||
| + | notification_topics = notifications | ||
| + | |||
| + | cpu_allocation_ratio = x (to set) | ||
| + | |||
| + | ram_allocation_ratio = y (to set) | ||
| + | |||
| + | --- | ||
| + | |||
| + | cd /root | ||
| + | |||
| + | wget http:// | ||
| + | |||
| + | tar zxvf DBUtils-1.1.tar.gz | ||
| + | |||
| + | cd DBUtils-1.1/ | ||
| + | |||
| + | python setup.py install | ||
| + | |||
| + | cd / | ||
| + | |||
| + | --- | ||
| + | |||
| + | root@egi-cloud:/ | ||
| + | |||
| + | change: | ||
| + | #server = service.Service.create(binary=' | ||
| + | # topic=CONF.conductor.topic, | ||
| + | # manager=CONF.conductor.manager) | ||
| + | with | ||
| + | server = service.Service.create(binary=' | ||
| + | topic=CONF.conductor.topic + " | ||
| + | manager=CONF.conductor.manager) | ||
| + | --- | ||
| + | |||
| + | now all is ready for synergy configuration: | ||
| + | |||
| + | cd / | ||
| + | |||
| + | root@egi-cloud:/ | ||
| + | |||
| + | --- | ||
| + | |||
| + | [DEFAULT] | ||
| + | |||
| + | rabbit_host=192.168.114.10 | ||
| + | |||
| + | rabbit_port=5672 | ||
| + | |||
| + | rabbit_hosts=192.168.114.10: | ||
| + | |||
| + | rabbit_use_ssl=False | ||
| + | |||
| + | # | ||
| + | |||
| + | rabbit_password=< | ||
| + | |||
| + | [WSGI] | ||
| + | |||
| + | host=192.168.114.10 | ||
| + | |||
| + | [MYSQL] | ||
| + | |||
| + | host=" | ||
| + | |||
| + | [FairShareManager] | ||
| + | |||
| + | type=manager | ||
| + | |||
| + | driver=synergy.managers.fairshare.FairShareManager | ||
| + | |||
| + | dependences=QueueManager, | ||
| + | |||
| + | scheduler_topic=scheduler | ||
| + | |||
| + | autostart=True | ||
| + | |||
| + | rate=300 | ||
| + | |||
| + | num_of_periods=3 | ||
| + | |||
| + | period_length=7 | ||
| + | |||
| + | decay_weight=0.5 | ||
| + | |||
| + | vcpus_weight=10000 | ||
| + | |||
| + | memory_weight=7000 | ||
| + | |||
| + | #fairshare tenants | ||
| + | |||
| + | projects=batch-short, | ||
| + | |||
| + | # | ||
| + | |||
| + | shares=batch-short=40, | ||
| + | |||
| + | #the default value | ||
| + | |||
| + | default_project_share=10.0 | ||
| + | |||
| + | default_runtinme_limit=10 | ||
| + | |||
| + | #lifetime in minutes for the VMs | ||
| + | |||
| + | dynamic_quota=batch-short=2, | ||
| + | |||
| + | # | ||
| + | |||
| + | [Keystone] | ||
| + | |||
| + | admin_user=synergy | ||
| + | |||
| + | admin_password=synergy | ||
| + | |||
| + | admin_project_name=service | ||
| + | |||
| + | # | ||
| + | |||
| + | auth_url=https:// | ||
| + | |||
| + | -------- | ||
| + | |||
| + | Create dynamic tenants: | ||
| + | |||
| + | keystone tenant-create --name batch-short --description " | ||
| + | |||
| + | keystone tenant-create --name batch-long --description " | ||
| + | |||
| + | |||
| + | Create related networks: | ||
| + | |||
| + | neutron net-create int-batch-short --router: | ||
| + | |||
| + | neutron net-create int-batch-long --router: | ||
| + | |||
| + | neutron subnet-create int-batch-short 10.0.8.0/24 --enable-dhcp --dns-nameserver 192.84.143.16 --allocation-pool start=10.0.8.2, | ||
| + | |||
| + | neutron subnet-create int-batch-long 10.0.9.0/24 --enable-dhcp --dns-nameserver 192.84.143.16 --allocation-pool start=10.0.9.2, | ||
| + | |||
| + | neutron router-interface-add ext-to-vos int-sub-batch-short | ||
| + | |||
| + | neutron router-interface-add ext-to-vos int-sub-batch-long | ||
| + | |||
| + | --- | ||
| + | |||
| + | change the / | ||
| + | |||
| + | cd / | ||
| + | |||
| + | vi localcontext.py | ||
| + | |||
| + | def clear_local_context(): | ||
| + | """ | ||
| + | if hasattr(_STORE, | ||
| + | delattr(_STORE, | ||
| + | --- | ||
| + | |||
| + | Start services: | ||
| + | |||
| + | service nova-conductor stop | ||
| + | |||
| + | service nova-scheduler stop | ||
| + | |||
| + | service nova-scheduler start | ||
| + | |||
| + | service nova-conductor start | ||
| + | |||
| + | service synergy start | ||
| + | |||
| + | --- | ||
| + | |||
| + | It is possible to use a synergy shell to get info about quota and priority | ||
| + | |||
| + | cd / | ||
| + | |||
| + | |||
| + | python shell.py get_priority | ||
| + | |||
| + | python shell.py get_quota | ||
| + | |||
