Merge lp:~dweaver/orange-box-examples/orange-box-examples into lp:~kirkland/orange-box-examples/trunk

Proposed by Darryl Weaver
Status: Merged
Merged at revision: 17
Proposed branch: lp:~dweaver/orange-box-examples/orange-box-examples
Merge into: lp:~kirkland/orange-box-examples/trunk
Diff against target: 8764 lines (+3955/-3876)
123 files modified
usr/lib/orange-box/examples/00-bootstrap.sh (+3/-10)
usr/lib/orange-box/examples/99-cleanup.sh (+4/-0)
usr/lib/orange-box/examples/README (+9/-0)
usr/lib/orange-box/examples/app-bundles/owncloud/owncloud-bundle.yaml (+0/-47)
usr/lib/orange-box/examples/hadoop/00-bootstrap.sh (+0/-16)
usr/lib/orange-box/examples/hadoop/01-deploy.sh (+10/-0)
usr/lib/orange-box/examples/hadoop/01-get-juju-gui-info.sh (+0/-6)
usr/lib/orange-box/examples/hadoop/02-hadoop.yaml (+0/-44)
usr/lib/orange-box/examples/hadoop/02-run-terasort.sh (+2/-0)
usr/lib/orange-box/examples/hadoop/03-hive-demo.txt (+9/-0)
usr/lib/orange-box/examples/hadoop/03-run-terasort.sh (+0/-2)
usr/lib/orange-box/examples/hadoop/04-hive-demo.txt (+0/-9)
usr/lib/orange-box/examples/hadoop/README (+11/-0)
usr/lib/orange-box/examples/hadoop/demo.sh (+0/-33)
usr/lib/orange-box/examples/hadoop/hadoop.yaml (+44/-0)
usr/lib/orange-box/examples/infrastructure/precise/01-deploy.sh (+13/-0)
usr/lib/orange-box/examples/infrastructure/precise/infrastructure-bundle.yaml (+42/-0)
usr/lib/orange-box/examples/infrastructure/trusty/01-deploy.sh (+13/-0)
usr/lib/orange-box/examples/infrastructure/trusty/infrastructure-bundle.yaml (+42/-0)
usr/lib/orange-box/examples/landscape/01-deploy.sh (+20/-0)
usr/lib/orange-box/examples/landscape/README (+56/-0)
usr/lib/orange-box/examples/landscape/landscape-deployments-ob.yaml (+91/-0)
usr/lib/orange-box/examples/openstack/complex/README (+0/-26)
usr/lib/orange-box/examples/openstack/complex/bridge2.xml (+0/-11)
usr/lib/orange-box/examples/openstack/complex/havana-colo/bundle.yaml (+0/-214)
usr/lib/orange-box/examples/openstack/complex/havana-compute/03configure-cloud.sh (+0/-14)
usr/lib/orange-box/examples/openstack/complex/havana-compute/bundle.yaml (+0/-164)
usr/lib/orange-box/examples/openstack/complex/havana-swift/bundle.yaml (+0/-196)
usr/lib/orange-box/examples/openstack/complex/havana/01demo-prep.sh (+0/-13)
usr/lib/orange-box/examples/openstack/complex/havana/02deploy.sh (+0/-31)
usr/lib/orange-box/examples/openstack/complex/havana/03configure-cloud.sh (+0/-17)
usr/lib/orange-box/examples/openstack/complex/havana/04cleanup.sh (+0/-30)
usr/lib/orange-box/examples/openstack/complex/havana/README (+0/-6)
usr/lib/orange-box/examples/openstack/complex/havana/bundle.yaml (+0/-214)
usr/lib/orange-box/examples/openstack/complex/juju-config/environments.yaml (+0/-13)
usr/lib/orange-box/examples/openstack/complex/juju-config/generate-jujuenv (+0/-37)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/README (+0/-21)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/configure-tests (+0/-6)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/configure_tests.py (+0/-60)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/config.py (+0/-103)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_devstack_exercises.py (+0/-105)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/cloud.py (+0/-351)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/config.py (+0/-46)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/juju/client.py (+0/-190)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/juju/juju_deployer.py (+0/-186)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/all_variables (+0/-31)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack.conf (+0/-11)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/exerciserc (+0/-32)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.master (+0/-110)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_essex (+0/-100)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_folsom (+0/-110)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_havana (+0/-112)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/openstack.conf (+0/-26)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/get-cloud-images (+0/-4)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/inspect-environment (+0/-187)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare-cloud (+0/-57)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare_cloud/folsom (+0/-147)
usr/lib/orange-box/examples/openstack/complex/openstack-configuration/verify-cloud (+0/-6)
usr/lib/orange-box/examples/openstack/complex/openstack-prereqs-install.sh (+0/-183)
usr/lib/orange-box/examples/openstack/complex/remove-kvms.sh (+0/-53)
usr/lib/orange-box/examples/openstack/havana/99-cleanup.sh (+0/-8)
usr/lib/orange-box/examples/openstack/icehouse/precise/00-bootstrap.sh (+0/-18)
usr/lib/orange-box/examples/openstack/icehouse/precise/01-deploy.sh (+1/-1)
usr/lib/orange-box/examples/openstack/icehouse/precise/02-configure-openstack.sh (+0/-72)
usr/lib/orange-box/examples/openstack/icehouse/precise/04-deploy-jumpserver-and-juju.sh (+0/-72)
usr/lib/orange-box/examples/openstack/icehouse/precise/99-cleanup.sh (+0/-11)
usr/lib/orange-box/examples/openstack/icehouse/precise/README (+17/-7)
usr/lib/orange-box/examples/openstack/icehouse/precise/automated-deploy.sh (+26/-0)
usr/lib/orange-box/examples/openstack/icehouse/precise/deploy-instances.sh (+40/-0)
usr/lib/orange-box/examples/openstack/icehouse/precise/icehouseOB.yaml (+95/-40)
usr/lib/orange-box/examples/openstack/icehouse/trusty/00-bootstrap.sh (+0/-18)
usr/lib/orange-box/examples/openstack/icehouse/trusty/01-deploy.sh (+1/-1)
usr/lib/orange-box/examples/openstack/icehouse/trusty/02-configure-openstack.sh (+0/-72)
usr/lib/orange-box/examples/openstack/icehouse/trusty/04-deploy-jumpserver-and-juju.sh (+0/-77)
usr/lib/orange-box/examples/openstack/icehouse/trusty/99-cleanup.sh (+0/-11)
usr/lib/orange-box/examples/openstack/icehouse/trusty/README (+15/-5)
usr/lib/orange-box/examples/openstack/icehouse/trusty/automated-deploy.sh (+26/-0)
usr/lib/orange-box/examples/openstack/icehouse/trusty/deploy-instances.sh (+40/-0)
usr/lib/orange-box/examples/openstack/icehouse/trusty/icehouseOB.yaml (+96/-41)
usr/lib/orange-box/examples/openstack/icehouse/trusty/nova.rc (+0/-8)
usr/lib/orange-box/examples/openstack/old-demos/README (+26/-0)
usr/lib/orange-box/examples/openstack/old-demos/SUPERCEDED_USE_ICEHOUSE (+2/-0)
usr/lib/orange-box/examples/openstack/old-demos/bridge2.xml (+11/-0)
usr/lib/orange-box/examples/openstack/old-demos/havana-colo/bundle.yaml (+214/-0)
usr/lib/orange-box/examples/openstack/old-demos/havana-compute/03configure-cloud.sh (+14/-0)
usr/lib/orange-box/examples/openstack/old-demos/havana-compute/bundle.yaml (+164/-0)
usr/lib/orange-box/examples/openstack/old-demos/havana-swift/bundle.yaml (+196/-0)
usr/lib/orange-box/examples/openstack/old-demos/havana/01demo-prep.sh (+13/-0)
usr/lib/orange-box/examples/openstack/old-demos/havana/02deploy.sh (+31/-0)
usr/lib/orange-box/examples/openstack/old-demos/havana/03configure-cloud.sh (+17/-0)
usr/lib/orange-box/examples/openstack/old-demos/havana/04cleanup.sh (+30/-0)
usr/lib/orange-box/examples/openstack/old-demos/havana/README (+6/-0)
usr/lib/orange-box/examples/openstack/old-demos/havana/bundle.yaml (+214/-0)
usr/lib/orange-box/examples/openstack/old-demos/juju-config/environments.yaml (+13/-0)
usr/lib/orange-box/examples/openstack/old-demos/juju-config/generate-jujuenv (+37/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/README (+21/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/configure-tests (+6/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/configure_tests.py (+60/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/devstack/config.py (+103/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/devstack/test_devstack_exercises.py (+105/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/devstack/test_utils/cloud.py (+351/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/devstack/test_utils/config.py (+46/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/devstack/test_utils/juju/client.py (+190/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/devstack/test_utils/juju/juju_deployer.py (+186/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/etc_master/all_variables (+31/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/etc_master/devstack.conf (+11/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/etc_master/devstack_templates/exerciserc (+32/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/etc_master/devstack_templates/openrc.master (+110/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/etc_master/devstack_templates/openrc.stable_essex (+100/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/etc_master/devstack_templates/openrc.stable_folsom (+110/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/etc_master/devstack_templates/openrc.stable_havana (+112/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/etc_master/openstack.conf (+26/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/get-cloud-images (+4/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/inspect-environment (+187/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/prepare-cloud (+57/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/prepare_cloud/folsom (+147/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-configuration/verify-cloud (+6/-0)
usr/lib/orange-box/examples/openstack/old-demos/openstack-prereqs-install.sh (+183/-0)
usr/lib/orange-box/examples/openstack/old-demos/remove-kvms.sh (+53/-0)
usr/lib/orange-box/examples/telco/00-bootstrap.sh (+0/-12)
usr/lib/orange-box/examples/telco/01-deploy.sh (+1/-1)
usr/lib/orange-box/examples/telco/99-cleanup.sh (+0/-8)
usr/lib/orange-box/examples/webdev-bundles/node-app/node-app.yaml (+3/-3)
To merge this branch: bzr merge lp:~dweaver/orange-box-examples/orange-box-examples
Reviewer Review Type Date Requested Status
Dustin Kirkland  Pending
Review via email: mp+227654@code.launchpad.net

Description of the change

Modified all bundles to fix version numbers of deployed charms.
Removed individual 00-bootstrap.sh and 99-cleanup.sh commands to use generic version.
Modified 00-bootstrap.sh to allow booting requested series (either precise or trusty).
Modified icehouse bundles to position in the GUI.
Added Landscape deployment for Landscape Installer demos.

To post a comment you must log in.
17. By Dustin Kirkland 

* === added directory usr/lib/orange-box/examples/infrastructure, ===
  added directory usr/lib/orange-box/examples/infrastructure/precise,
  === added directory usr/lib/orange-
  box/examples/infrastructure/trusty, === added directory
  usr/lib/orange-box/examples/landscape, === added directory
  usr/lib/orange-box/examples/openstack/old-demos, === added directory
  usr/lib/orange-box/examples/openstack/old-demos/havana, === added
  directory usr/lib/orange-box/examples/openstack/old-demos/havana-
  colo, === added directory usr/lib/orange-box/examples/openstack/old-
  demos/havana-compute, === added directory usr/lib/orange-
  box/examples/openstack/old-demos/havana-swift, === added directory
  usr/lib/orange-box/examples/openstack/old-demos/juju-config, ===
  added directory usr/lib/orange-box/examples/openstack/old-
  demos/openstack-configuration, === added directory usr/lib/orange-
  box/examples/openstack/old-demos/openstack-configuration/devstack,
  === added directory usr/lib/orange-box/examples/openstack/old-
  demos/openstack-configuration/devstack/test_utils, === added
  directory usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/devstack/test_utils/juju, === added directory
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/etc_master, === added directory usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/etc_master/devstack_templates, === added directory
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/prepare_cloud, === added symlink usr/lib/orange-
  box/examples/openstack/old-demos/havana-colo/01demo-prep.sh, ===
  added symlink usr/lib/orange-box/examples/openstack/old-
  demos/havana-colo/02deploy.sh, === added symlink usr/lib/orange-
  box/examples/openstack/old-demos/havana-colo/03configure-cloud.sh,
  === added symlink usr/lib/orange-box/examples/openstack/old-
  demos/havana-colo/04cleanup.sh, === added symlink usr/lib/orange-
  box/examples/openstack/old-demos/havana-colo/README, === added
  symlink usr/lib/orange-box/examples/openstack/old-demos/havana-
  compute/01demo-prep.sh, === added symlink usr/lib/orange-
  box/examples/openstack/old-demos/havana-compute/02deploy.sh, ===
  added symlink usr/lib/orange-box/examples/openstack/old-
  demos/havana-compute/04cleanup.sh, === added symlink usr/lib/orange-
  box/examples/openstack/old-demos/havana-compute/README, === added
  symlink usr/lib/orange-box/examples/openstack/old-demos/havana-
  swift/01demo-prep.sh, === added symlink usr/lib/orange-
  box/examples/openstack/old-demos/havana-swift/02deploy.sh, === added
  symlink usr/lib/orange-box/examples/openstack/old-demos/havana-
  swift/03configure-cloud.sh, === added symlink usr/lib/orange-
  box/examples/openstack/old-demos/havana-swift/04cleanup.sh, ===
  added symlink usr/lib/orange-box/examples/openstack/old-
  demos/havana-swift/README, === added symlink usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/prepare_cloud/essex, === added symlink usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/prepare_cloud/grizzly, === added symlink
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/prepare_cloud/havana, === added symlink
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/prepare_cloud/icehouse, === removed directory
  usr/lib/orange-box/examples/app-bundles/owncloud, === removed
  directory usr/lib/orange-box/examples/openstack/complex, === removed
  directory usr/lib/orange-box/examples/openstack/complex/havana, ===
  removed directory usr/lib/orange-
  box/examples/openstack/complex/havana-colo, === removed directory
  usr/lib/orange-box/examples/openstack/complex/havana-compute, ===
  removed directory usr/lib/orange-
  box/examples/openstack/complex/havana-swift, === removed directory
  usr/lib/orange-box/examples/openstack/complex/juju-config, ===
  removed directory usr/lib/orange-
  box/examples/openstack/complex/openstack-configuration, === removed
  directory usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/devstack, === removed directory usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/devstack/test_utils, === removed directory
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/devstack/test_utils/juju, === removed directory
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/etc_master, === removed directory usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/etc_master/devstack_templates, === removed directory
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/prepare_cloud, === removed symlink usr/lib/orange-
  box/examples/openstack/complex/havana-colo/01demo-prep.sh, ===
  removed symlink usr/lib/orange-
  box/examples/openstack/complex/havana-colo/02deploy.sh, === removed
  symlink usr/lib/orange-box/examples/openstack/complex/havana-
  colo/03configure-cloud.sh, === removed symlink usr/lib/orange-
  box/examples/openstack/complex/havana-colo/04cleanup.sh, === removed
  symlink usr/lib/orange-box/examples/openstack/complex/havana-
  colo/README, === removed symlink usr/lib/orange-
  box/examples/openstack/complex/havana-compute/01demo-prep.sh, ===
  removed symlink usr/lib/orange-
  box/examples/openstack/complex/havana-compute/02deploy.sh, ===
  removed symlink usr/lib/orange-
  box/examples/openstack/complex/havana-compute/04cleanup.sh, ===
  removed symlink usr/lib/orange-
  box/examples/openstack/complex/havana-compute/README, === removed
  symlink usr/lib/orange-box/examples/openstack/complex/havana-
  swift/01demo-prep.sh, === removed symlink usr/lib/orange-
  box/examples/openstack/complex/havana-swift/02deploy.sh, === removed
  symlink usr/lib/orange-box/examples/openstack/complex/havana-
  swift/03configure-cloud.sh, === removed symlink usr/lib/orange-
  box/examples/openstack/complex/havana-swift/04cleanup.sh, ===
  removed symlink usr/lib/orange-
  box/examples/openstack/complex/havana-swift/README, === removed
  symlink usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/prepare_cloud/essex, === removed symlink
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/prepare_cloud/grizzly, === removed symlink
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/prepare_cloud/havana, === removed symlink
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/prepare_cloud/icehouse, === target is ufolsom, ===
  target is ugrizzly, === target is uhavana, === target is
  u../havana/01demo-prep.sh, === target is u../havana/02deploy.sh, ===
  target is u../havana/03configure-cloud.sh, === target is
  u../havana/04cleanup.sh, === target is u../havana/README, === target
  was ufolsom, === target was ugrizzly, === target was uhavana, ===
  target was u../havana/01demo-prep.sh, === target was
  u../havana/02deploy.sh, === target was u../havana/03configure-
  cloud.sh, === target was u../havana/04cleanup.sh, === target was
  u../havana/README, usr/lib/orange-box/examples/00-bootstrap.sh,
  usr/lib/orange-box/examples/99-cleanup.sh, usr/lib/orange-
  box/examples/app-bundles/owncloud/owncloud-bundle.yaml,
  usr/lib/orange-box/examples/hadoop/00-bootstrap.sh, usr/lib/orange-
  box/examples/hadoop/01-deploy.sh, usr/lib/orange-
  box/examples/hadoop/01-get-juju-gui-info.sh, usr/lib/orange-
  box/examples/hadoop/02-hadoop.yaml, usr/lib/orange-
  box/examples/hadoop/02-run-terasort.sh, usr/lib/orange-
  box/examples/hadoop/03-hive-demo.txt, usr/lib/orange-
  box/examples/hadoop/03-run-terasort.sh, usr/lib/orange-
  box/examples/hadoop/04-hive-demo.txt, usr/lib/orange-
  box/examples/hadoop/demo.sh, usr/lib/orange-
  box/examples/hadoop/hadoop.yaml, usr/lib/orange-
  box/examples/hadoop/README, usr/lib/orange-
  box/examples/infrastructure/precise/01-deploy.sh, usr/lib/orange-
  box/examples/infrastructure/precise/infrastructure-bundle.yaml,
  usr/lib/orange-box/examples/infrastructure/trusty/01-deploy.sh,
  usr/lib/orange-box/examples/infrastructure/trusty/infrastructure-
  bundle.yaml, usr/lib/orange-box/examples/landscape/01-deploy.sh,
  usr/lib/orange-box/examples/landscape/landscape-deployments-ob.yaml,
  usr/lib/orange-box/examples/landscape/README, usr/lib/orange-
  box/examples/openstack/complex/bridge2.xml, usr/lib/orange-
  box/examples/openstack/complex/havana/01demo-prep.sh,
  usr/lib/orange-box/examples/openstack/complex/havana/02deploy.sh,
  usr/lib/orange-box/examples/openstack/complex/havana/03configure-
  cloud.sh, usr/lib/orange-
  box/examples/openstack/complex/havana/04cleanup.sh, usr/lib/orange-
  box/examples/openstack/complex/havana/bundle.yaml, usr/lib/orange-
  box/examples/openstack/complex/havana-colo/bundle.yaml,
  usr/lib/orange-box/examples/openstack/complex/havana-
  compute/03configure-cloud.sh, usr/lib/orange-
  box/examples/openstack/complex/havana-compute/bundle.yaml,
  usr/lib/orange-box/examples/openstack/complex/havana/README,
  usr/lib/orange-box/examples/openstack/complex/havana-
  swift/bundle.yaml, usr/lib/orange-
  box/examples/openstack/complex/juju-config/environments.yaml,
  usr/lib/orange-box/examples/openstack/complex/juju-config/generate-
  jujuenv, usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/configure-tests, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/configure_tests.py, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/devstack/config.py, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/devstack/__init__.py, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/devstack/test_devstack_exercises.py, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/devstack/test_utils/cloud.py, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/devstack/test_utils/config.py, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/devstack/test_utils/__init__.py, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/devstack/test_utils/juju/client.py, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/devstack/test_utils/juju/__init__.py, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/devstack/test_utils/juju/juju_deployer.py,
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/etc_master/all_variables, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/etc_master/devstack.conf, usr/lib/orange-
  box/examples/openstack/complex/openstack-
  configuration/etc_master/devstack_templates/exerciserc,
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/etc_master/devstack_templates/openrc.master,
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/etc_master/devstack_templates/openrc.stable_essex,
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/etc_master/devstack_templates/openrc.stable_folsom,
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/etc_master/devstack_templates/openrc.stable_havana,
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/etc_master/openstack.conf, usr/lib/orange-
  box/examples/openstack/complex/openstack-configuration/get-cloud-
  images, usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/inspect-environment, usr/lib/orange-
  box/examples/openstack/complex/openstack-configuration/prepare-
  cloud, usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/prepare_cloud/folsom, usr/lib/orange-
  box/examples/openstack/complex/openstack-configuration/README,
  usr/lib/orange-box/examples/openstack/complex/openstack-
  configuration/verify-cloud, usr/lib/orange-
  box/examples/openstack/complex/openstack-prereqs-install.sh,
  usr/lib/orange-box/examples/openstack/complex/README,
  usr/lib/orange-box/examples/openstack/complex/remove-kvms.sh,
  usr/lib/orange-box/examples/openstack/havana/99-cleanup.sh,
  usr/lib/orange-box/examples/openstack/icehouse/precise/00-
  bootstrap.sh, usr/lib/orange-
  box/examples/openstack/icehouse/precise/01-deploy.sh,
  usr/lib/orange-box/examples/openstack/icehouse/precise/02-configure-
  openstack.sh, usr/lib/orange-
  box/examples/openstack/icehouse/precise/04-deploy-jumpserver-and-
  juju.sh, usr/lib/orange-box/examples/openstack/icehouse/precise/99-
  cleanup.sh, usr/lib/orange-
  box/examples/openstack/icehouse/precise/automated-deploy.sh,
  usr/lib/orange-box/examples/openstack/icehouse/precise/deploy-
  instances.sh, usr/lib/orange-
  box/examples/openstack/icehouse/precise/icehouseOB.yaml,
  usr/lib/orange-box/examples/openstack/icehouse/precise/README,
  usr/lib/orange-box/examples/openstack/icehouse/trusty/00-
  bootstrap.sh, usr/lib/orange-
  box/examples/openstack/icehouse/trusty/01-deploy.sh, usr/lib/orange-
  box/examples/openstack/icehouse/trusty/02-configure-openstack.sh,
  usr/lib/orange-box/examples/openstack/icehouse/trusty/04-deploy-
  jumpserver-and-juju.sh, usr/lib/orange-
  box/examples/openstack/icehouse/trusty/99-cleanup.sh,
  usr/lib/orange-box/examples/openstack/icehouse/trusty/automated-
  deploy.sh, usr/lib/orange-
  box/examples/openstack/icehouse/trusty/deploy-instances.sh,
  usr/lib/orange-
  box/examples/openstack/icehouse/trusty/icehouseOB.yaml,
  usr/lib/orange-box/examples/openstack/icehouse/trusty/nova.rc,
  usr/lib/orange-box/examples/openstack/icehouse/trusty/README,
  usr/lib/orange-box/examples/openstack/old-demos/bridge2.xml,
  usr/lib/orange-box/examples/openstack/old-demos/havana/01demo-
  prep.sh, usr/lib/orange-box/examples/openstack/old-
  demos/havana/02deploy.sh, usr/lib/orange-box/examples/openstack/old-
  demos/havana/03configure-cloud.sh, usr/lib/orange-
  box/examples/openstack/old-demos/havana/04cleanup.sh,
  usr/lib/orange-box/examples/openstack/old-demos/havana/bundle.yaml,
  usr/lib/orange-box/examples/openstack/old-demos/havana-
  colo/bundle.yaml, usr/lib/orange-box/examples/openstack/old-
  demos/havana-compute/03configure-cloud.sh, usr/lib/orange-
  box/examples/openstack/old-demos/havana-compute/bundle.yaml,
  usr/lib/orange-box/examples/openstack/old-demos/havana/README,
  usr/lib/orange-box/examples/openstack/old-demos/havana-
  swift/bundle.yaml, usr/lib/orange-box/examples/openstack/old-
  demos/juju-config/environments.yaml, usr/lib/orange-
  box/examples/openstack/old-demos/juju-config/generate-jujuenv,
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/configure-tests, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/configure_tests.py, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/devstack/config.py, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/devstack/__init__.py, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/devstack/test_devstack_exercises.py, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/devstack/test_utils/cloud.py, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/devstack/test_utils/config.py, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/devstack/test_utils/__init__.py, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/devstack/test_utils/juju/client.py, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/devstack/test_utils/juju/__init__.py, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/devstack/test_utils/juju/juju_deployer.py,
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/etc_master/all_variables, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/etc_master/devstack.conf, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-
  configuration/etc_master/devstack_templates/exerciserc,
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/etc_master/devstack_templates/openrc.master,
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/etc_master/devstack_templates/openrc.stable_essex,
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/etc_master/devstack_templates/openrc.stable_folsom,
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/etc_master/devstack_templates/openrc.stable_havana,
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/etc_master/openstack.conf, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-configuration/get-cloud-
  images, usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/inspect-environment, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-configuration/prepare-
  cloud, usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/prepare_cloud/folsom, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-configuration/README,
  usr/lib/orange-box/examples/openstack/old-demos/openstack-
  configuration/verify-cloud, usr/lib/orange-
  box/examples/openstack/old-demos/openstack-prereqs-install.sh,
  usr/lib/orange-box/examples/openstack/old-demos/README,
  usr/lib/orange-box/examples/openstack/old-demos/remove-kvms.sh,
  usr/lib/orange-box/examples/openstack/old-
  demos/SUPERCEDED_USE_ICEHOUSE, usr/lib/orange-box/examples/README,
  usr/lib/orange-box/examples/telco/00-bootstrap.sh, usr/lib/orange-
  box/examples/telco/01-deploy.sh, usr/lib/orange-
  box/examples/telco/99-cleanup.sh, usr/lib/orange-
  box/examples/webdev-bundles/node-app/node-app.yaml:
  - Modified all bundles to fix version numbers of deployed charms.
  - Removed individual 00-bootstrap.sh and 99-cleanup.sh commands to
    use generic version.
  - Modified 00-bootstrap.sh to allow booting requested series
    (either precise or trusty).
  - Modified icehouse bundles to position in the GUI.
  - Added Landscape deployment for Landscape Installer demos.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'usr/lib/orange-box/examples/00-bootstrap.sh'
--- usr/lib/orange-box/examples/00-bootstrap.sh 2014-07-16 07:31:25 +0000
+++ usr/lib/orange-box/examples/00-bootstrap.sh 2014-07-24 01:23:40 +0000
@@ -1,12 +1,5 @@
1#!/bin/bash1#!/bin/bash
2#2#
3# Ameet Paranjape, 2 April 20143# Darryl Weaver, 21 July 2014
44
5set -x5orange-box-bootstrap-juju
6
7juju status && echo "Existing deployment found, exiting." && exit 0
8juju bootstrap --constraints "tags=virtual" --show-log --upload-tools
9juju set-constraints "tags="
10juju deploy --to 0 --repository=/srv/charmstore/ local:precise/juju-gui
11juju expose juju-gui
12
136
=== added file 'usr/lib/orange-box/examples/99-cleanup.sh'
--- usr/lib/orange-box/examples/99-cleanup.sh 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/99-cleanup.sh 2014-07-24 01:23:40 +0000
@@ -0,0 +1,4 @@
1#!/bin/bash
2
3orange-box-destroy-juju
4
05
=== modified file 'usr/lib/orange-box/examples/README'
--- usr/lib/orange-box/examples/README 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/README 2014-07-24 01:23:40 +0000
@@ -3,3 +3,12 @@
3Each directory contains a demo for the micro cluster as well as a README 3Each directory contains a demo for the micro cluster as well as a README
4file on how to run the demo. It is highly recommended to read the 4file on how to run the demo. It is highly recommended to read the
5README before running a demo!5README before running a demo!
6
7To bootstrap Juju run:
8./00-bootstrap.sh
9
10Then deploy a demo by reading the README and usually running:
11cd demo-folder
12./01-deploy.sh
13
14Sometimes you can deploy a bundle using the Juju-gui, but there can be problems you can't see from the GUI, so please deploy complex applications using the command line.
615
=== removed directory 'usr/lib/orange-box/examples/app-bundles/owncloud'
=== removed file 'usr/lib/orange-box/examples/app-bundles/owncloud/owncloud-bundle.yaml'
--- usr/lib/orange-box/examples/app-bundles/owncloud/owncloud-bundle.yaml 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/app-bundles/owncloud/owncloud-bundle.yaml 1970-01-01 00:00:00 +0000
@@ -1,47 +0,0 @@
1envExport:
2 services:
3 owncloud:
4 charm: "cs:precise/owncloud-13"
5 num_units: 1
6 options:
7 password: admin
8 user: admin
9 annotations:
10 "gui-x": "332"
11 "gui-y": "304"
12 "owncloud-mysql":
13 charm: "cs:precise/mysql-46"
14 num_units: 1
15 annotations:
16 "gui-x": "330"
17 "gui-y": "609"
18 "owncloud-phpmyadmin":
19 charm: "cs:precise/phpmyadmin-4"
20 num_units: 1
21 expose: true
22 annotations:
23 "gui-x": "722"
24 "gui-y": "607"
25 "owncloud-haproxy":
26 charm: "cs:precise/haproxy-31"
27 num_units: 1
28 expose: true
29 annotations:
30 "gui-x": "332"
31 "gui-y": "18"
32 "owncloud-nfs":
33 charm: "cs:precise/nfs-4"
34 num_units: 1
35 annotations:
36 "gui-x": "-114"
37 "gui-y": "449"
38 relations:
39 - - "owncloud:db"
40 - "owncloud-mysql:db"
41 - - "owncloud-phpmyadmin:db-admin"
42 - "owncloud-mysql:db-admin"
43 - - "owncloud-haproxy:reverseproxy"
44 - "owncloud:website"
45 - - "owncloud:shared-fs"
46 - "owncloud-nfs:nfs"
47 series: precise
480
=== removed file 'usr/lib/orange-box/examples/hadoop/00-bootstrap.sh'
--- usr/lib/orange-box/examples/hadoop/00-bootstrap.sh 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/hadoop/00-bootstrap.sh 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
1#!/bin/bash
2
3# Remove any stale ssh known hosts
4rm -f ~/.ssh/known_hosts
5
6# Bootstrap the juju environment
7juju bootstrap --debug
8
9# Deploy the juju-gui to the bootstrap node
10juju deploy --to=0 juju-gui
11juju expose juju-gui
12
13ADMIN_SECRET=`cat ~/.juju/environments/maas.jenv | grep admin-secret | awk '{ print $2 }'`
14JUJU_GUI=`juju status juju-gui | grep public-address | awk '{ print $2 }' | xargs host | grep address | awk '{ print $4 }'`
15echo "Admin Secret: $ADMIN_SECRET"
16echo "juju-gui: http://$JUJU_GUI"
170
=== added file 'usr/lib/orange-box/examples/hadoop/01-deploy.sh'
--- usr/lib/orange-box/examples/hadoop/01-deploy.sh 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/hadoop/01-deploy.sh 2014-07-24 01:23:40 +0000
@@ -0,0 +1,10 @@
1#!/bin/bash
2
3
4set -e
5
6juju set-constraints tags=
7juju-deployer -c hadoop.yaml
8
9
10echo "Deployment finished"
011
=== removed file 'usr/lib/orange-box/examples/hadoop/01-get-juju-gui-info.sh'
--- usr/lib/orange-box/examples/hadoop/01-get-juju-gui-info.sh 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/hadoop/01-get-juju-gui-info.sh 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1#!/bin/bash
2ADMIN_SECRET=`cat ~/.juju/environments/maas.jenv | grep admin-secret | awk '{ print $2 }'`
3JUJU_GUI=`juju status juju-gui | grep public-address | awk '{ print $2 }' | xargs host | grep address | awk '{ print $4 }'`
4echo "Admin Secret: $ADMIN_SECRET"
5echo "juju-gui: http://$JUJU_GUI"
6
70
=== removed file 'usr/lib/orange-box/examples/hadoop/02-hadoop.yaml'
--- usr/lib/orange-box/examples/hadoop/02-hadoop.yaml 2014-07-16 07:31:25 +0000
+++ usr/lib/orange-box/examples/hadoop/02-hadoop.yaml 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
1envExport:
2 services:
3 "hadoop-master":
4 charm: "cs:trusty/hadoop-13"
5 num_units: 1
6 expose: true
7 constraints: tags=physical
8 annotations:
9 "gui-x": "914.9191466830049"
10 "gui-y": "112.84003435856067"
11 hive-metadata:
12 charm: "cs:precise/mysql-46"
13 num_units: 1
14 options:
15 "binlog-format": ROW
16 annotations:
17 "gui-x": "1424.919207718161"
18 "gui-y": "343.5067213702795"
19 hive:
20 charm: "cs:precise/hive-5"
21 num_units: 1
22 to: "hive-metadata"
23 annotations:
24 "gui-x": "1146.5858336947235"
25 "gui-y": "340.3796452663048"
26 "hadoop-slavecluster":
27 charm: "cs:trusty/hadoop-13"
28 num_units: 2
29 constraints: tags=physical
30 annotations:
31 "gui-x": "648.3332046960281"
32 "gui-y": "340.61878278661516"
33 relations:
34 - - "hive:jobtracker"
35 - "hadoop-master:resourcemanager"
36 - - "hive:namenode"
37 - "hadoop-master:namenode"
38 - - "hive:db"
39 - "hive-metadata:db"
40 - - "hadoop-master:resourcemanager"
41 - "hadoop-slavecluster:nodemanager"
42 - - "hadoop-master:namenode"
43 - "hadoop-slavecluster:datanode"
44 series: precise
450
=== added file 'usr/lib/orange-box/examples/hadoop/02-run-terasort.sh'
--- usr/lib/orange-box/examples/hadoop/02-run-terasort.sh 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/hadoop/02-run-terasort.sh 2014-07-24 01:23:40 +0000
@@ -0,0 +1,2 @@
1#!/bin/bash
2juju ssh hadoop-master/0 "sudo su -l ubuntu -c /home/ubuntu/hadoop/terasort.sh"
03
=== added file 'usr/lib/orange-box/examples/hadoop/03-hive-demo.txt'
--- usr/lib/orange-box/examples/hadoop/03-hive-demo.txt 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/hadoop/03-hive-demo.txt 2014-07-24 01:23:40 +0000
@@ -0,0 +1,9 @@
1create database demo;
2juju ssh hive/0
3sudo su
4su - hdfs
5hive
6use demo;
7create external table demo (field1 STRING, field2 STRING) location '/user/hdfs/demo';
8load data inpath '/user/hdfs/out_dir/part-00001' into table demo;
9select count(field1) from demo;
010
=== removed file 'usr/lib/orange-box/examples/hadoop/03-run-terasort.sh'
--- usr/lib/orange-box/examples/hadoop/03-run-terasort.sh 2014-07-16 07:31:25 +0000
+++ usr/lib/orange-box/examples/hadoop/03-run-terasort.sh 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
1#!/bin/bash
2juju ssh hadoop-master/0 "sudo su -l ubuntu -c /home/ubuntu/hadoop/terasort.sh"
30
=== removed file 'usr/lib/orange-box/examples/hadoop/04-hive-demo.txt'
--- usr/lib/orange-box/examples/hadoop/04-hive-demo.txt 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/hadoop/04-hive-demo.txt 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
1create database demo;
2juju ssh hive/0
3sudo su
4su - hdfs
5hive
6use demo;
7create external table demo (field1 STRING, field2 STRING) location '/user/hdfs/demo';
8load data inpath '/user/hdfs/out_dir/part-00001' into table demo;
9select count(field1) from demo;
100
=== added file 'usr/lib/orange-box/examples/hadoop/README'
--- usr/lib/orange-box/examples/hadoop/README 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/hadoop/README 2014-07-24 01:23:40 +0000
@@ -0,0 +1,11 @@
1Run the command:
2./01-deploy.sh to deploy hadoop.
3./02-run-terasort.sh to run an example terasort and watch it from the hadoop web UI.
4
5To find out the Hadoop Web UI address run:
6./get-hadoop-info.sh
7
8There are demo commands for hive in:
903-hive-demo.txt
10But you must run these manually, so cat the file and then run the commands at your terminal one at a time.
11
012
=== removed file 'usr/lib/orange-box/examples/hadoop/demo.sh'
--- usr/lib/orange-box/examples/hadoop/demo.sh 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/hadoop/demo.sh 1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
1#!/bin/bash
2
3# Remove any stale ssh known hosts
4rm -f ~/.ssh/known_hosts
5
6# Bootstrap the juju environment
7juju bootstrap --debug
8
9# Deploy the juju-gui to the bootstrap node
10juju deploy --to=0 juju-gui
11juju expose juju-gui
12
13# Deploy hadoop ( with HBase enabled )
14juju deploy hadoop hadoop-master
15juju set hadoop-master hbase=True
16juju deploy hadoop hadoop-slavecluster -n 3
17juju set hadoop-slavecluster hbase=True
18juju add-relation hadoop-master:namenode hadoop-slavecluster:datanode
19juju add-relation hadoop-master:jobtracker hadoop-slavecluster:tasktracker
20juju expose hadoop-master
21
22# Deploy hive ( with MySQL )
23juju deploy hive -n 3
24juju deploy mysql
25juju set mysql binlog-format=ROW
26juju add-relation hive:db mysql:db
27juju add-relation hive:namenode hadoop-master:namenode
28juju add-relation hive:jobtracker hadoop-master:jobtracker
29
30ADMIN_SECRET=`cat ~/.juju/environments/maas.jenv | grep admin-secret | awk '{ print $2 }'`
31JUJU_GUI=`juju status juju-gui | grep public-address | awk '{ print $2 }' | xargs host | grep address | awk '{ print $4 }'`
32echo "Admin Secret: $ADMIN_SECRET"
33echo "juju-gui: http://$JUJU_GUI"
340
=== added file 'usr/lib/orange-box/examples/hadoop/hadoop.yaml'
--- usr/lib/orange-box/examples/hadoop/hadoop.yaml 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/hadoop/hadoop.yaml 2014-07-24 01:23:40 +0000
@@ -0,0 +1,44 @@
1envExport:
2 services:
3 "hadoop-master":
4 charm: "cs:trusty/hadoop-13"
5 num_units: 1
6 expose: true
7 constraints: tags=physical
8 annotations:
9 "gui-x": "914.9191466830049"
10 "gui-y": "112.84003435856067"
11 hive-metadata:
12 charm: "cs:precise/mysql-46"
13 num_units: 1
14 options:
15 "binlog-format": ROW
16 annotations:
17 "gui-x": "1424.919207718161"
18 "gui-y": "343.5067213702795"
19 hive:
20 charm: "cs:precise/hive-5"
21 num_units: 1
22 to: "hive-metadata"
23 annotations:
24 "gui-x": "1146.5858336947235"
25 "gui-y": "340.3796452663048"
26 "hadoop-slavecluster":
27 charm: "cs:trusty/hadoop-13"
28 num_units: 2
29 constraints: tags=physical
30 annotations:
31 "gui-x": "648.3332046960281"
32 "gui-y": "340.61878278661516"
33 relations:
34 - - "hive:jobtracker"
35 - "hadoop-master:resourcemanager"
36 - - "hive:namenode"
37 - "hadoop-master:namenode"
38 - - "hive:db"
39 - "hive-metadata:db"
40 - - "hadoop-master:resourcemanager"
41 - "hadoop-slavecluster:nodemanager"
42 - - "hadoop-master:namenode"
43 - "hadoop-slavecluster:datanode"
44 series: precise
045
=== added directory 'usr/lib/orange-box/examples/infrastructure'
=== added directory 'usr/lib/orange-box/examples/infrastructure/precise'
=== added file 'usr/lib/orange-box/examples/infrastructure/precise/01-deploy.sh'
--- usr/lib/orange-box/examples/infrastructure/precise/01-deploy.sh 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/infrastructure/precise/01-deploy.sh 2014-07-24 01:23:40 +0000
@@ -0,0 +1,13 @@
1#!/bin/bash
2
3set -e
4
5sudo rm -f /srv/charmstore/precise/rsyslog-primary;sudo ln -s /srv/charmstore/precise/rsyslog /srv/charmstore/precise/rsyslog-primary
6sudo rm -f /srv/charmstore/precise/rsyslog-secondary;sudo ln -s /srv/charmstore/precise/rsyslog /srv/charmstore/precise/rsyslog-secondary
7sudo rm -f /srv/charmstore/precise/logstash-elasticsearch;sudo ln -s /srv/charmstore/precise/elasticsearch /srv/charmstore/precise/logstash-elasticsearch
8
9juju set-constraints tags=
10juju-deployer -c infrastructure-bundle.yaml
11
12
13echo "Deployment finished"
014
=== added file 'usr/lib/orange-box/examples/infrastructure/precise/infrastructure-bundle.yaml'
--- usr/lib/orange-box/examples/infrastructure/precise/infrastructure-bundle.yaml 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/infrastructure/precise/infrastructure-bundle.yaml 2014-07-24 01:23:40 +0000
@@ -0,0 +1,42 @@
1envExport:
2 services:
3 "landscape-client":
4 branch: "lp:charms/landscape-client"
5 num_units: 0
6 annotations:
7 "gui-x": "-420"
8 "gui-y": "545"
9 nagios:
10 branch: "lp:charms/nagios"
11 num_units: 1
12 constraints: tags=nagios
13 expose: true
14 annotations:
15 "gui-x": "-680"
16 "gui-y": "785"
17 nrpe:
18 branch: "lp:charms/nrpe"
19 num_units: 0
20 annotations:
21 "gui-x": "-420"
22 "gui-y": "785"
23 ganglia:
24 branch: "lp:charms/ganglia"
25 num_units: 1
26 to: lxc:nagios=0
27 expose: true
28 annotations:
29 "gui-x": "-680"
30 "gui-y": "1020"
31 "ganglia-node":
32 branch: "lp:charms/ganglia-node"
33 num_units: 0
34 annotations:
35 "gui-x": "-420"
36 "gui-y": "1020"
37 relations:
38 - - "ganglia:node"
39 - "ganglia-node:node"
40 - - "nagios:monitors"
41 - "nrpe:monitors"
42 series: precise
043
=== added directory 'usr/lib/orange-box/examples/infrastructure/trusty'
=== added file 'usr/lib/orange-box/examples/infrastructure/trusty/01-deploy.sh'
--- usr/lib/orange-box/examples/infrastructure/trusty/01-deploy.sh 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/infrastructure/trusty/01-deploy.sh 2014-07-24 01:23:40 +0000
@@ -0,0 +1,13 @@
1#!/bin/bash
2
3set -e
4
5sudo rm -f /srv/charmstore/trusty/rsyslog-primary;sudo ln -s /srv/charmstore/trusty/rsyslog /srv/charmstore/trusty/rsyslog-primary
6sudo rm -f /srv/charmstore/trusty/rsyslog-secondary;sudo ln -s /srv/charmstore/trusty/rsyslog /srv/charmstore/trusty/rsyslog-secondary
7sudo rm -f /srv/charmstore/trusty/logstash-elasticsearch;sudo ln -s /srv/charmstore/trusty/elasticsearch /srv/charmstore/trusty/logstash-elasticsearch
8
9juju set-constraints tags=
10juju-deployer -c infrastructure-bundle.yaml
11
12
13echo "Deployment finished"
014
=== added file 'usr/lib/orange-box/examples/infrastructure/trusty/infrastructure-bundle.yaml'
--- usr/lib/orange-box/examples/infrastructure/trusty/infrastructure-bundle.yaml 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/infrastructure/trusty/infrastructure-bundle.yaml 2014-07-24 01:23:40 +0000
@@ -0,0 +1,42 @@
1envExport:
2 services:
3 "landscape-client":
4 branch: "lp:charms/landscape-client"
5 num_units: 0
6 annotations:
7 "gui-x": "-420"
8 "gui-y": "545"
9 nagios:
10 branch: "lp:charms/nagios"
11 num_units: 1
12 constraints: tags=nagios
13 expose: true
14 annotations:
15 "gui-x": "-680"
16 "gui-y": "785"
17 nrpe:
18 branch: "lp:charms/nrpe"
19 num_units: 0
20 annotations:
21 "gui-x": "-420"
22 "gui-y": "785"
23 ganglia:
24 branch: "lp:charms/ganglia"
25 num_units: 1
26 to: lxc:nagios=0
27 expose: true
28 annotations:
29 "gui-x": "-680"
30 "gui-y": "1020"
31 "ganglia-node":
32 branch: "lp:charms/ganglia-node"
33 num_units: 0
34 annotations:
35 "gui-x": "-420"
36 "gui-y": "1020"
37 relations:
38 - - "ganglia:node"
39 - "ganglia-node:node"
40 - - "nagios:monitors"
41 - "nrpe:monitors"
42 series: trusty
043
=== added directory 'usr/lib/orange-box/examples/landscape'
=== added file 'usr/lib/orange-box/examples/landscape/01-deploy.sh'
--- usr/lib/orange-box/examples/landscape/01-deploy.sh 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/landscape/01-deploy.sh 2014-07-24 01:23:40 +0000
@@ -0,0 +1,20 @@
1#!/bin/bash
2
3
4set -e
5
6if [ ! -f repo-file ]; then
7 echo "repo-file not found! exiting"
8 exit
9fi
10if [ ! -f license-file ]; then
11 echo "license-file not found! exiting"
12 exit
13fi
14
15
16juju set-constraints tags=
17juju-deployer -c landscape-deployments-ob.yaml landscape-ob
18
19
20echo "Deployment finished"
021
=== added file 'usr/lib/orange-box/examples/landscape/README'
--- usr/lib/orange-box/examples/landscape/README 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/landscape/README 2014-07-24 01:23:40 +0000
@@ -0,0 +1,56 @@
1Landscape Installer Demo
2
3Prerequisites:
4
5At least 5 physical nodes with a second disk.
6 You will therefore need extra USB flash drives (pref 64GB) on nodes without a second disk already (nodes 1-4).
7
8At least 1 node with 2 NICs, all management services will be installed here, including Neutron and Juju bootstrap.
9 This should be on node0vm1.maas.
10 This virtual machine must have at least 20GB of space available.
11
12At least 1 MAAS node with the MAAS tag "landscape", this should be node1.maas.
13
14You will need to create a file: "repo-file" in this directory with the URL of the Landscape repository.
15
16You will need to create a file: "license-file" in this directory with a valid license or trial license to use Landscape.
17
18Overview:
19
20First an initial Juju environment will be used to deploy Landscape itself onto the OB.
21Once Landscape is installed, register the MAAS into Landscape.
22Then use the Openstack Installer Page to install the rest of the cloud onto a new Juju environment managed by Landscape.
23Once installed, find the details to connect to the Openstack Dashboard from Landscape.
24Log in and start using the cloud.
25
26Method:
27
281) Bootstrap the first Juju environment on node0vm0.maas and install Juju-gui.
292) Deploy Landscape on node1.maas.
303) Connect to Landscape Web UI and create initial admin user.
314) Register the MAAS server into Landscape.
325) Use the Landscape Cloud Installer to deploy a new Juju environment with Openstack.
336) When completed, get the login credentials from Landscape.
347) Log into the Openstack Dashboard to deploy instances.
35
36Commands:
37
38Use the normal bootstrap in ~/Examples/00-bootstrap.sh - bootstraps Juju and installs the GUI.
39cd ~/Examples/landscape
40./01-deploy.sh - Deploys the Landscape Bundle
41More demo actions here, such as deploying a cloud.
42Then destroying the cloud.
43./99-cleanup.sh - Destroys the Landscape Juju environment.
44
45Troubleshooting:
46
47To troubleshoot the Landscape Juju environment
481) Connect to the landscape instance
49 juju ssh landscape/0
502) sudo to the Landscape user, setting JUJU_HOME
51 sudo -u landscape JUJU_HOME=/var/lib/landscape/juju-homes/XXX/ bash
52Where XXX is the Juju environment number (find it from the Juju tab in Landscape UI)
533) Use juju commands as normal
54 juju stat
55 juju debug-log
56
057
=== added file 'usr/lib/orange-box/examples/landscape/landscape-deployments-ob.yaml'
--- usr/lib/orange-box/examples/landscape/landscape-deployments-ob.yaml 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/landscape/landscape-deployments-ob.yaml 2014-07-24 01:23:40 +0000
@@ -0,0 +1,91 @@
1_common:
2 services:
3 rabbitmq-server:
4 charm: cs:precise/rabbitmq-server-28
5 postgresql:
6 charm: cs:precise/postgresql-73
7 constraints: mem=2048
8 options:
9 extra-packages: python-apt postgresql-contrib postgresql-.*-debversion
10 max_connections: 500
11 haproxy:
12 charm: cs:precise/haproxy-31
13 options:
14 enable_monitoring: True
15 monitoring_allowed_cidr: "0.0.0.0/0"
16 monitoring_password: "haproxy"
17 default_timeouts: "queue 60000, connect 5000, client 120000, server 120000"
18 # Don't deploy default haproxy service on port 80
19 services: ""
20 apache2:
21 charm: cs:precise/apache2-24
22 expose: True
23 options:
24 enable_modules: proxy proxy_http proxy_balancer rewrite expires headers ssl
25 ssl_cert: SELFSIGNED
26 ssl_certlocation: apache2.cert
27 ssl_keylocation: apache2.key
28
29landscape:
30 inherits: _common
31 series: precise
32 services:
33 landscape:
34 branch: lp:~landscape/landscape-charm/stable
35 constraints: mem=2048
36 options:
37 service-count: "2"
38 landscape-password: "look-a-different-password"
39 services: static appserver pingserver combo-loader async-frontend apiserver package-upload jobhandler package-search cron juju-sync
40 repository: include-file://repo-file
41 license-file: include-file://license-file
42 landscape-msg:
43 branch: lp:~landscape/landscape-charm/stable
44 charm: landscape
45 constraints: mem=2048
46 options:
47 landscape-password: "look-a-different-password"
48 services: msgserver
49 repository: include-file://repo-file
50 license-file: include-file://license-file
51 relations:
52 - [landscape, rabbitmq-server]
53 - [landscape, haproxy]
54 - ["landscape:vhost-config", "apache2:vhost-config"]
55 - ["landscape:db-admin", "postgresql:db-admin"]
56 - ["haproxy:website", "apache2:reverseproxy"]
57 - [landscape-msg, rabbitmq-server]
58 - [landscape-msg, haproxy]
59 - ["landscape-msg:db-admin", "postgresql:db-admin"]
60
61landscape-dense-maas:
62 inherits: landscape
63 services:
64 landscape:
65 to: lxc:0
66 landscape-msg:
67 to: lxc:0
68 postgresql:
69 to: lxc:0
70 rabbitmq-server:
71 to: lxc:0
72 apache2:
73 to: lxc:0
74 haproxy:
75 to: lxc:0
76
77landscape-ob:
78 inherits: landscape
79 services:
80 landscape:
81 constraints: tags=landscape
82 landscape-msg:
83 to: lxc:landscape=0
84 postgresql:
85 to: lxc:landscape=0
86 rabbitmq-server:
87 to: lxc:landscape=0
88 apache2:
89 to: lxc:landscape=0
90 haproxy:
91 to: lxc:landscape=0
092
=== removed directory 'usr/lib/orange-box/examples/openstack/complex'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/README'
--- usr/lib/orange-box/examples/openstack/complex/README 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/README 1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
1*** CURRENTLY BROKEN ***
2
3This is the Openstack deployment demo folder.
4
5Step 1: Run the script:
6./openstack-prereqs-install.sh
7
8Step 2: Change into a subdirectory of the deployment you want to use, use havana as default.
9cd havana
10
11Step 3: Run the pre-deployment to set up Juju and the GUI
12./01demo-prep.sh
13
14Step 4: Ready to run the demo!
15./02deploy.sh
16
17Step 5: Configure Openstack and Juju to Use Openstack
18./03configure-cloud.sh
19
20Step 6: Deploy other workloads ontop of Openstack.
21See other demo workload folders
22
23Step 7: Cleanup after a demo:
24./04cleanup.sh
25
26Ready to run the demo again.
270
=== removed file 'usr/lib/orange-box/examples/openstack/complex/bridge2.xml'
--- usr/lib/orange-box/examples/openstack/complex/bridge2.xml 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/bridge2.xml 1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
1<network>
2 <name>bridge2</name>
3 <uuid>406212bb-45f7-4af7-91b6-0edfb6e5908c</uuid>
4 <forward dev='eth0' mode='nat'>
5 <interface dev='eth0'/>
6 </forward>
7 <bridge name='virbr1' stp='on' delay='0'/>
8 <mac address='52:54:00:e7:ee:1e'/>
9 <ip address='172.16.1.1' netmask='255.255.255.0'>
10 </ip>
11</network>
120
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/havana'
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/havana-colo'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-colo/01demo-prep.sh'
=== target was u'../havana/01demo-prep.sh'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-colo/02deploy.sh'
=== target was u'../havana/02deploy.sh'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-colo/03configure-cloud.sh'
=== target was u'../havana/03configure-cloud.sh'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-colo/04cleanup.sh'
=== target was u'../havana/04cleanup.sh'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-colo/README'
=== target was u'../havana/README'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/havana-colo/bundle.yaml'
--- usr/lib/orange-box/examples/openstack/complex/havana-colo/bundle.yaml 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/havana-colo/bundle.yaml 1970-01-01 00:00:00 +0000
@@ -1,214 +0,0 @@
1# vim :set ts=2 et:
2openstack:
3 series: precise
4 overrides:
5 openstack-origin: cloud:precise-havana
6 source: cloud:precise-updates/havana
7 services:
8 ubuntu:
9 charm: cs:precise/ubuntu
10 constraints: tags=nuc
11 landscape-client:
12 charm: cs:precise/landscape-client
13 options:
14 origin: ppa:landscape/trunk
15 exchange-interval: 60
16 urgent-exchange-interval: 30
17 ping-interval: 10
18 script-users: ALL
19 include-manager-plugins: ScriptExecution
20 lds:
21 branch: lp:charms/lds-quickstart
22 options:
23 server_fqdn: lds.master
24 admin_email: admin@lds.master
25 admin_name: admin
26 admin_password: Password1+
27 license: include-file://license.txt
28 sample_data: False
29 constraints: tags=lds
30 mysql:
31 charm: cs:precise/mysql-29
32 options:
33 dataset-size: 50%
34 to: lxc:ubuntu=0
35 rabbitmq-server:
36 charm: cs:precise/rabbitmq-server-16
37 constraints: mem=1G
38 to: lxc:ubuntu=0
39 ceph:
40 charm: cs:precise/ceph
41 num_units: 6
42 options:
43 monitor-count: 3
44 fsid: 9e7aac42-4bf4-11e3-b4b7-5254006a039c
45 monitor-secret: AQAAvoJSOAv/NRAAgvXP8d7iXN7lWYbvDZzm2Q==
46 osd-devices: /srv
47 osd-reformat: "yes"
48 to: [nova-compute=0, nova-compute=1, nova-compute=2, nova-compute=3, nova-compute=4, nova-compute=5]
49 keystone:
50 charm: cs:precise/keystone-23
51 options:
52 admin-password: Password1+
53 admin-token: ubuntutesting
54 to: lxc:ubuntu=0
55 openstack-dashboard:
56 charm: cs:precise/openstack-dashboard-11
57 options:
58 offline-compression: "no"
59 webroot: "/"
60 to: lxc:ubuntu=0
61 nova-compute:
62 charm: cs:precise/nova-compute
63 num_units: 8
64 options:
65 config-flags: "auto_assign_floating_ip=False"
66 enable-live-migration: False
67 virt-type: kvm
68 constraints: tags=nuc
69 nova-cloud-controller:
70 charm: cs:precise/nova-cloud-controller-19
71 options:
72 network-manager: Neutron
73 quantum-security-groups: "yes"
74 to: lxc:ubuntu=0
75 neutron-gateway:
76 charm: cs:precise/quantum-gateway-12
77 options:
78 ext-port: eth0
79 constraints: tags=neutron
80 cinder:
81 charm: cs:precise/cinder-14
82 options:
83 block-device: "None"
84 to: lxc:ubuntu=0
85 glance:
86 charm: cs:precise/glance-26
87 to: lxc:ubuntu=0
88 swift-proxy:
89 charm: cs:precise/swift-proxy
90 options:
91 zone-assignment: manual
92 replicas: 2
93 use-https: 'no'
94 swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae
95 to: lxc:ubuntu=0
96 swift-storage-z1:
97 charm: cs:precise/swift-storage
98 options:
99 zone: 1
100 block-device: "/srv/swift.img|30G"
101 to: nova-compute=6
102 swift-storage-z2:
103 charm: cs:precise/swift-storage
104 options:
105 zone: 2
106 block-device: "/srv/swift.img|30G"
107 to: nova-compute=7
108 ceilometer:
109 charm: cs:precise/ceilometer
110 to: lxc:ubuntu=0
111 ceilometer-agent:
112 charm: cs:precise/ceilometer-agent
113 mongodb:
114 charm: cs:precise/mongodb
115 to: lxc:ubuntu=0
116 ntp:
117 charm: cs:precise/ntp
118 relations:
119 - - keystone
120 - mysql
121 - - nova-cloud-controller
122 - mysql
123 - - nova-cloud-controller
124 - rabbitmq-server
125 - - nova-cloud-controller
126 - glance
127 - - nova-cloud-controller
128 - keystone
129 - - nova-compute
130 - nova-cloud-controller
131 - - nova-compute
132 - mysql
133 - - nova-compute
134 - rabbitmq-server:amqp
135 - - nova-compute
136 - glance
137 - - nova-compute
138 - ceph
139 - - glance
140 - mysql
141 - - glance
142 - keystone
143 - - glance
144 - ceph
145 - - glance
146 - cinder
147 - - cinder
148 - mysql
149 - - cinder
150 - rabbitmq-server
151 - - cinder
152 - nova-cloud-controller
153 - - cinder
154 - keystone
155 - - cinder
156 - ceph
157 - - neutron-gateway
158 - mysql
159 - - neutron-gateway
160 - rabbitmq-server
161 - - neutron-gateway
162 - nova-cloud-controller
163 - - openstack-dashboard
164 - keystone
165 - - swift-proxy
166 - keystone
167 - - swift-proxy
168 - swift-storage-z1
169 - - swift-proxy
170 - swift-storage-z2
171 - - ceilometer
172 - keystone
173 - - ceilometer
174 - rabbitmq-server
175 - - ceilometer
176 - mongodb
177 - - ceilometer-agent:nova-ceilometer
178 - nova-compute:nova-ceilometer
179 - - ceilometer-agent:ceilometer-service
180 - ceilometer:ceilometer-service
181 - - ntp:juju-info
182 - nova-compute:juju-info
183 - - ntp:juju-info
184 - nova-cloud-controller:juju-info
185 - - ntp:juju-info
186 - neutron-gateway:juju-info
187 - - ntp:juju-info
188 - ceph:juju-info
189 - - ntp:juju-info
190 - cinder:juju-info
191 - - ntp:juju-info
192 - keystone:juju-info
193 - - ntp:juju-info
194 - glance:juju-info
195 - - ntp:juju-info
196 - swift-proxy:juju-info
197 - - ntp:juju-info
198 - swift-storage-z1:juju-info
199 - - ntp:juju-info
200 - swift-storage-z2:juju-info
201 - - ntp:juju-info
202 - ceilometer:juju-info
203 - - ntp:juju-info
204 - mongodb:juju-info
205 - - ntp:juju-info
206 - rabbitmq-server:juju-info
207 - - ntp:juju-info
208 - mysql:juju-info
209 - - ntp:juju-info
210 - openstack-dashboard:juju-info
211 - - landscape-client:container
212 - [ lds, neutron-gateway, ubuntu, mysql, cinder, keystone, rabbitmq-server, glance, openstack-dashboard, nova-cloud-controller, ceilometer, mongodb, nova-compute, swift-proxy ]
213 - - landscape-client:registration
214 - lds
2150
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/havana-compute'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-compute/01demo-prep.sh'
=== target was u'../havana/01demo-prep.sh'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-compute/02deploy.sh'
=== target was u'../havana/02deploy.sh'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/havana-compute/03configure-cloud.sh'
--- usr/lib/orange-box/examples/openstack/complex/havana-compute/03configure-cloud.sh 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/havana-compute/03configure-cloud.sh 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
1#!/bin/bash
2
3echo "Configuring Openstack environment"
4cd ../openstack-configuration/
5
6[ -f ~/images/precise-server-cloudimg-amd64-disk1.img ] || ./get-cloud-images
7
8./inspect-environment
9source envrc
10
11./prepare-cloud havana
12
13echo "Skipping Juju config as no Object Storage available for Juju"
14
150
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-compute/04cleanup.sh'
=== target was u'../havana/04cleanup.sh'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-compute/README'
=== target was u'../havana/README'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/havana-compute/bundle.yaml'
--- usr/lib/orange-box/examples/openstack/complex/havana-compute/bundle.yaml 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/havana-compute/bundle.yaml 1970-01-01 00:00:00 +0000
@@ -1,164 +0,0 @@
1# vim :set ts=2 et:
2openstack:
3 series: precise
4 overrides:
5 openstack-origin: cloud:precise-havana
6 source: cloud:precise-updates/havana
7 services:
8 ubuntu:
9 charm: cs:precise/ubuntu
10 constraints: tags=nuc
11 landscape-client:
12 charm: cs:precise/landscape-client
13 options:
14 origin: ppa:landscape/trunk
15 exchange-interval: 60
16 urgent-exchange-interval: 30
17 ping-interval: 10
18 script-users: ALL
19 include-manager-plugins: ScriptExecution
20 lds:
21 branch: lp:charms/lds-quickstart
22 options:
23 server_fqdn: lds.master
24 admin_email: admin@lds.master
25 admin_name: admin
26 admin_password: Password1+
27 license: include-file://license.txt
28 sample_data: False
29 constraints: tags=lds
30 mysql:
31 charm: cs:precise/mysql-29
32 options:
33 dataset-size: 50%
34 to: lxc:ubuntu=0
35 rabbitmq-server:
36 charm: cs:precise/rabbitmq-server-16
37 constraints: mem=1G
38 to: lxc:ubuntu=0
39 keystone:
40 charm: cs:precise/keystone-23
41 options:
42 admin-password: Password1+
43 admin-token: ubuntutesting
44 to: lxc:ubuntu=0
45 openstack-dashboard:
46 charm: cs:precise/openstack-dashboard-11
47 options:
48 offline-compression: "no"
49 webroot: "/"
50 to: lxc:ubuntu=0
51 nova-compute:
52 charm: cs:precise/nova-compute
53 num_units: 7
54 options:
55 config-flags: "auto_assign_floating_ip=False"
56 enable-live-migration: False
57 virt-type: kvm
58 constraints: tags=nuc
59 nova-cloud-controller:
60 charm: cs:precise/nova-cloud-controller-19
61 options:
62 network-manager: Neutron
63 quantum-security-groups: "yes"
64 to: lxc:ubuntu=0
65 neutron-gateway:
66 charm: cs:precise/quantum-gateway-12
67 options:
68 ext-port: eth0
69 constraints: tags=neutron
70 cinder:
71 charm: cs:precise/cinder-14
72 options:
73 block-device: "/srv/cinder.img|40G"
74 constraints: tags=nuc
75 glance:
76 charm: cs:precise/glance-26
77 to: lxc:ubuntu=0
78 ceilometer:
79 charm: cs:precise/ceilometer
80 to: lxc:ubuntu=0
81 ceilometer-agent:
82 charm: cs:precise/ceilometer-agent
83 mongodb:
84 charm: cs:precise/mongodb
85 to: lxc:ubuntu=0
86 ntp:
87 charm: cs:precise/ntp
88 relations:
89 - - keystone
90 - mysql
91 - - nova-cloud-controller
92 - mysql
93 - - nova-cloud-controller
94 - rabbitmq-server
95 - - nova-cloud-controller
96 - glance
97 - - nova-cloud-controller
98 - keystone
99 - - nova-compute
100 - nova-cloud-controller
101 - - nova-compute
102 - mysql
103 - - nova-compute
104 - rabbitmq-server:amqp
105 - - nova-compute
106 - glance
107 - - glance
108 - mysql
109 - - glance
110 - keystone
111 - - glance
112 - cinder
113 - - cinder
114 - mysql
115 - - cinder
116 - rabbitmq-server
117 - - cinder
118 - nova-cloud-controller
119 - - cinder
120 - keystone
121 - - neutron-gateway
122 - mysql
123 - - neutron-gateway
124 - rabbitmq-server
125 - - neutron-gateway
126 - nova-cloud-controller
127 - - openstack-dashboard
128 - keystone
129 - - ceilometer
130 - keystone
131 - - ceilometer
132 - rabbitmq-server
133 - - ceilometer
134 - mongodb
135 - - ceilometer-agent:nova-ceilometer
136 - nova-compute:nova-ceilometer
137 - - ceilometer-agent:ceilometer-service
138 - ceilometer:ceilometer-service
139 - - ntp:juju-info
140 - nova-compute:juju-info
141 - - ntp:juju-info
142 - nova-cloud-controller:juju-info
143 - - ntp:juju-info
144 - neutron-gateway:juju-info
145 - - ntp:juju-info
146 - cinder:juju-info
147 - - ntp:juju-info
148 - keystone:juju-info
149 - - ntp:juju-info
150 - glance:juju-info
151 - - ntp:juju-info
152 - ceilometer:juju-info
153 - - ntp:juju-info
154 - mongodb:juju-info
155 - - ntp:juju-info
156 - rabbitmq-server:juju-info
157 - - ntp:juju-info
158 - mysql:juju-info
159 - - ntp:juju-info
160 - openstack-dashboard:juju-info
161 - - landscape-client:container
162 - [ lds, neutron-gateway, ubuntu, mysql, cinder, keystone, rabbitmq-server, glance, openstack-dashboard, nova-cloud-controller, ceilometer, mongodb, nova-compute ]
163 - - landscape-client:registration
164 - lds
1650
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/havana-swift'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-swift/01demo-prep.sh'
=== target was u'../havana/01demo-prep.sh'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-swift/02deploy.sh'
=== target was u'../havana/02deploy.sh'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-swift/03configure-cloud.sh'
=== target was u'../havana/03configure-cloud.sh'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-swift/04cleanup.sh'
=== target was u'../havana/04cleanup.sh'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/havana-swift/README'
=== target was u'../havana/README'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/havana-swift/bundle.yaml'
--- usr/lib/orange-box/examples/openstack/complex/havana-swift/bundle.yaml 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/havana-swift/bundle.yaml 1970-01-01 00:00:00 +0000
@@ -1,196 +0,0 @@
1# vim :set ts=2 et:
2openstack:
3 series: precise
4 overrides:
5 openstack-origin: cloud:precise-havana
6 source: cloud:precise-updates/havana
7 services:
8 ubuntu:
9 charm: cs:precise/ubuntu
10 constraints: tags=nuc
11 landscape-client:
12 charm: cs:precise/landscape-client
13 options:
14 origin: ppa:landscape/trunk
15 exchange-interval: 60
16 urgent-exchange-interval: 30
17 ping-interval: 10
18 script-users: ALL
19 include-manager-plugins: ScriptExecution
20 lds:
21 branch: lp:charms/lds-quickstart
22 options:
23 server_fqdn: lds.master
24 admin_email: admin@lds.master
25 admin_name: admin
26 admin_password: Password1+
27 license: include-file://license.txt
28 sample_data: False
29 constraints: tags=lds
30 mysql:
31 charm: cs:precise/mysql-29
32 options:
33 dataset-size: 50%
34 to: lxc:ubuntu=0
35 rabbitmq-server:
36 charm: cs:precise/rabbitmq-server-16
37 constraints: mem=1G
38 to: lxc:ubuntu=0
39 keystone:
40 charm: cs:precise/keystone-23
41 options:
42 admin-password: Password1+
43 admin-token: ubuntutesting
44 to: lxc:ubuntu=0
45 openstack-dashboard:
46 charm: cs:precise/openstack-dashboard-11
47 options:
48 offline-compression: "no"
49 webroot: "/"
50 to: lxc:ubuntu=0
51 nova-compute:
52 charm: cs:precise/nova-compute
53 num_units: 5
54 options:
55 config-flags: "auto_assign_floating_ip=False"
56 enable-live-migration: False
57 virt-type: kvm
58 constraints: tags=nuc
59 nova-cloud-controller:
60 charm: cs:precise/nova-cloud-controller-19
61 options:
62 network-manager: Neutron
63 quantum-security-groups: "yes"
64 to: lxc:ubuntu=0
65 neutron-gateway:
66 charm: cs:precise/quantum-gateway-12
67 options:
68 ext-port: eth0
69 constraints: tags=neutron
70 cinder:
71 charm: cs:precise/cinder-14
72 options:
73 block-device: "/srv/cinder.img|40G"
74 constraints: tags=nuc
75 glance:
76 charm: cs:precise/glance-26
77 to: lxc:ubuntu=0
78 swift-proxy:
79 charm: cs:precise/swift-proxy
80 options:
81 zone-assignment: manual
82 replicas: 2
83 use-https: 'no'
84 swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae
85 to: lxc:ubuntu=0
86 swift-storage-z1:
87 charm: cs:precise/swift-storage
88 options:
89 zone: 1
90 block-device: "/srv/swift.img|40G"
91 constraints: tags=nuc
92 swift-storage-z2:
93 charm: cs:precise/swift-storage
94 options:
95 zone: 2
96 block-device: "/srv/swift.img|40G"
97 constraints: tags=nuc
98 ceilometer:
99 charm: cs:precise/ceilometer
100 to: lxc:ubuntu=0
101 ceilometer-agent:
102 charm: cs:precise/ceilometer-agent
103 mongodb:
104 charm: cs:precise/mongodb
105 to: lxc:ubuntu=0
106 ntp:
107 charm: cs:precise/ntp
108 relations:
109 - - keystone
110 - mysql
111 - - nova-cloud-controller
112 - mysql
113 - - nova-cloud-controller
114 - rabbitmq-server
115 - - nova-cloud-controller
116 - glance
117 - - nova-cloud-controller
118 - keystone
119 - - nova-compute
120 - nova-cloud-controller
121 - - nova-compute
122 - mysql
123 - - nova-compute
124 - rabbitmq-server:amqp
125 - - nova-compute
126 - glance
127 - - glance
128 - mysql
129 - - glance
130 - keystone
131 - - glance
132 - cinder
133 - - cinder
134 - mysql
135 - - cinder
136 - rabbitmq-server
137 - - cinder
138 - nova-cloud-controller
139 - - cinder
140 - keystone
141 - - neutron-gateway
142 - mysql
143 - - neutron-gateway
144 - rabbitmq-server
145 - - neutron-gateway
146 - nova-cloud-controller
147 - - openstack-dashboard
148 - keystone
149 - - swift-proxy
150 - keystone
151 - - swift-proxy
152 - swift-storage-z1
153 - - swift-proxy
154 - swift-storage-z2
155 - - ceilometer
156 - keystone
157 - - ceilometer
158 - rabbitmq-server
159 - - ceilometer
160 - mongodb
161 - - ceilometer-agent:nova-ceilometer
162 - nova-compute:nova-ceilometer
163 - - ceilometer-agent:ceilometer-service
164 - ceilometer:ceilometer-service
165 - - ntp:juju-info
166 - nova-compute:juju-info
167 - - ntp:juju-info
168 - nova-cloud-controller:juju-info
169 - - ntp:juju-info
170 - neutron-gateway:juju-info
171 - - ntp:juju-info
172 - cinder:juju-info
173 - - ntp:juju-info
174 - keystone:juju-info
175 - - ntp:juju-info
176 - glance:juju-info
177 - - ntp:juju-info
178 - swift-proxy:juju-info
179 - - ntp:juju-info
180 - swift-storage-z1:juju-info
181 - - ntp:juju-info
182 - swift-storage-z2:juju-info
183 - - ntp:juju-info
184 - ceilometer:juju-info
185 - - ntp:juju-info
186 - mongodb:juju-info
187 - - ntp:juju-info
188 - rabbitmq-server:juju-info
189 - - ntp:juju-info
190 - mysql:juju-info
191 - - ntp:juju-info
192 - openstack-dashboard:juju-info
193 - - landscape-client:container
194 - [ lds, neutron-gateway, ubuntu, mysql, cinder, keystone, rabbitmq-server, glance, openstack-dashboard, nova-cloud-controller, ceilometer, mongodb, nova-compute, swift-proxy, swift-storage-z1, swift-storage-z2 ]
195 - - landscape-client:registration
196 - lds
1970
=== removed file 'usr/lib/orange-box/examples/openstack/complex/havana/01demo-prep.sh'
--- usr/lib/orange-box/examples/openstack/complex/havana/01demo-prep.sh 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/havana/01demo-prep.sh 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
1#!/bin/bash
2#Canonical Micro-Cluster Demo Preparation
3echo "checking for existing Juju environment..."
4juju status && echo "Existing deployment found, exiting." && exit
5
6echo "Deploying Juju Bootstrap node to Virtual machine: juju.local using tags=juju"
7juju bootstrap --upload-tools=true --constraints "tags=juju"
8
9echo "unset constraints"
10juju set-constraints tags=""
11echo "Deploying Juju-gui to bootstrap node"
12juju deploy --to 0 juju-gui
13
140
=== removed file 'usr/lib/orange-box/examples/openstack/complex/havana/02deploy.sh'
--- usr/lib/orange-box/examples/openstack/complex/havana/02deploy.sh 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/havana/02deploy.sh 1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
1#!/bin/bash
2
3set -ex
4if [ ! -d ~/landscape ]; then
5 bzr launchpad-login || ( echo "Please set your Launchpad login: bzr launchpad-login LAUNCHPAD_ID and re-run." && false )
6 bzr branch lp:landscape ~/landscape
7fi
8
9if [ ! -f ~/license.txt ]; then
10 (echo "Need to create license.txt" && false)
11else
12 cp ~/license.txt ./license.txt
13fi
14
15if [ ! -d precise/lds ]; then
16 mkdir -p precise
17 cp -r ~/landscape/dev/charms/precise/lds-quickstart precise/lds
18 (
19 cd precise/lds
20 bzr init
21 bzr add
22 bzr commit -m "Fake lds charm"
23 )
24fi
25
26juju-deployer -c bundle.yaml -d
27
28# NOTE: add relation not encompassed in bundle
29juju add-relation landscape-client:container juju-gui
30
31echo "Deployment finished"
320
=== removed file 'usr/lib/orange-box/examples/openstack/complex/havana/03configure-cloud.sh'
--- usr/lib/orange-box/examples/openstack/complex/havana/03configure-cloud.sh 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/havana/03configure-cloud.sh 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
1#!/bin/bash
2
3echo "Configuring Openstack environment"
4cd ../openstack-configuration/
5
6[ -f ~/images/precise-server-cloudimg-amd64-disk1.img ] || ./get-cloud-images
7
8./inspect-environment
9source envrc
10
11./prepare-cloud havana
12
13echo "Configuring Juju environment"
14cd ../juju-config/
15./generate-jujuenv
16
17
180
=== removed file 'usr/lib/orange-box/examples/openstack/complex/havana/04cleanup.sh'
--- usr/lib/orange-box/examples/openstack/complex/havana/04cleanup.sh 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/havana/04cleanup.sh 1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
1#!/bin/bash
2
3juju destroy-environment maas
4
5#Need to remove the Juju environments
6rm -rf ~/.juju/
7
8#Removing known hosts as all keys will be regenerated when re-deploying.
9rm ~/.ssh/known_hosts
10
11#Now re-create MAAS Juju environment.
12mkdir ~/.juju
13
14maas_oauth=$(maas-cli list | awk '{ print $3 }')
15
16cat > ~/.juju/environments.yaml <<EOF
17environments:
18 maas:
19 type: maas
20 admin-secret: Password1+
21
22 # maas-server specifies the location of the MAAS server. It must
23 # specify the base path.
24 maas-server: 'http://10.14.4.1/MAAS/'
25
26 # maas-oauth holds the OAuth credentials from MAAS.
27 maas-oauth: '$maas_oauth'
28EOF
29
30
310
=== removed file 'usr/lib/orange-box/examples/openstack/complex/havana/README'
--- usr/lib/orange-box/examples/openstack/complex/havana/README 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/havana/README 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1This demo bundle deploys Openstack Havana with Ceph and Swift and Ceilometer with LDS
2
301pre-deploy.sh - deploys Juju bootstrap and the Juju GUI
402deploy.sh - deploys the Openstack Bundle
503configure-cloud.sh - sets up networks and uploads an image and configures the Juju environment for Openstack as the default.
604cleanup.sh - destroys the MAAS Juju environment
70
=== removed file 'usr/lib/orange-box/examples/openstack/complex/havana/bundle.yaml'
--- usr/lib/orange-box/examples/openstack/complex/havana/bundle.yaml 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/havana/bundle.yaml 1970-01-01 00:00:00 +0000
@@ -1,214 +0,0 @@
1# vim :set ts=2 et:
2openstack:
3 series: precise
4 overrides:
5 openstack-origin: cloud:precise-havana
6 source: cloud:precise-updates/havana
7 services:
8 ubuntu:
9 charm: cs:precise/ubuntu
10 constraints: tags=nuc
11 landscape-client:
12 charm: cs:precise/landscape-client
13 options:
14 origin: ppa:landscape/trunk
15 exchange-interval: 60
16 urgent-exchange-interval: 30
17 ping-interval: 10
18 script-users: ALL
19 include-manager-plugins: ScriptExecution
20 lds:
21 branch: lp:charms/lds-quickstart
22 options:
23 server_fqdn: lds.master
24 admin_email: admin@lds.master
25 admin_name: admin
26 admin_password: Password1+
27 license: include-file://license.txt
28 sample_data: False
29 constraints: tags=lds
30 mysql:
31 charm: cs:precise/mysql-29
32 options:
33 dataset-size: 50%
34 to: lxc:ubuntu=0
35 rabbitmq-server:
36 charm: cs:precise/rabbitmq-server-16
37 constraints: mem=1G
38 to: lxc:ubuntu=0
39 ceph:
40 charm: cs:precise/ceph
41 num_units: 3
42 options:
43 monitor-count: 3
44 fsid: 9e7aac42-4bf4-11e3-b4b7-5254006a039c
45 monitor-secret: AQAAvoJSOAv/NRAAgvXP8d7iXN7lWYbvDZzm2Q==
46 osd-devices: /srv
47 osd-reformat: "yes"
48 constraints: tags=nuc
49 keystone:
50 charm: cs:precise/keystone-23
51 options:
52 admin-password: Password1+
53 admin-token: ubuntutesting
54 to: lxc:ubuntu=0
55 openstack-dashboard:
56 charm: cs:precise/openstack-dashboard-11
57 options:
58 offline-compression: "no"
59 webroot: "/"
60 to: lxc:ubuntu=0
61 nova-compute:
62 charm: cs:precise/nova-compute
63 num_units: 3
64 options:
65 config-flags: "auto_assign_floating_ip=False"
66 enable-live-migration: False
67 virt-type: kvm
68 constraints: tags=nuc
69 nova-cloud-controller:
70 charm: cs:precise/nova-cloud-controller-19
71 options:
72 network-manager: Neutron
73 quantum-security-groups: "yes"
74 to: lxc:ubuntu=0
75 neutron-gateway:
76 charm: cs:precise/quantum-gateway-12
77 options:
78 ext-port: eth0
79 constraints: tags=neutron
80 cinder:
81 charm: cs:precise/cinder-14
82 options:
83 block-device: "None"
84 to: lxc:ubuntu=0
85 glance:
86 charm: cs:precise/glance-26
87 to: lxc:ubuntu=0
88 swift-proxy:
89 charm: cs:precise/swift-proxy
90 options:
91 zone-assignment: manual
92 replicas: 2
93 use-https: 'no'
94 swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae
95 to: lxc:ubuntu=0
96 swift-storage-z1:
97 charm: cs:precise/swift-storage
98 options:
99 zone: 1
100 block-device: "/srv/swift.img|40G"
101 constraints: tags=nuc
102 swift-storage-z2:
103 charm: cs:precise/swift-storage
104 options:
105 zone: 2
106 block-device: "/srv/swift.img|40G"
107 constraints: tags=nuc
108 ceilometer:
109 charm: cs:precise/ceilometer
110 to: lxc:ubuntu=0
111 ceilometer-agent:
112 charm: cs:precise/ceilometer-agent
113 mongodb:
114 charm: cs:precise/mongodb
115 to: lxc:ubuntu=0
116 ntp:
117 charm: cs:precise/ntp
118 relations:
119 - - keystone
120 - mysql
121 - - nova-cloud-controller
122 - mysql
123 - - nova-cloud-controller
124 - rabbitmq-server
125 - - nova-cloud-controller
126 - glance
127 - - nova-cloud-controller
128 - keystone
129 - - nova-compute
130 - nova-cloud-controller
131 - - nova-compute
132 - mysql
133 - - nova-compute
134 - rabbitmq-server:amqp
135 - - nova-compute
136 - glance
137 - - nova-compute
138 - ceph
139 - - glance
140 - mysql
141 - - glance
142 - keystone
143 - - glance
144 - ceph
145 - - glance
146 - cinder
147 - - cinder
148 - mysql
149 - - cinder
150 - rabbitmq-server
151 - - cinder
152 - nova-cloud-controller
153 - - cinder
154 - keystone
155 - - cinder
156 - ceph
157 - - neutron-gateway
158 - mysql
159 - - neutron-gateway
160 - rabbitmq-server
161 - - neutron-gateway
162 - nova-cloud-controller
163 - - openstack-dashboard
164 - keystone
165 - - swift-proxy
166 - keystone
167 - - swift-proxy
168 - swift-storage-z1
169 - - swift-proxy
170 - swift-storage-z2
171 - - ceilometer
172 - keystone
173 - - ceilometer
174 - rabbitmq-server
175 - - ceilometer
176 - mongodb
177 - - ceilometer-agent:nova-ceilometer
178 - nova-compute:nova-ceilometer
179 - - ceilometer-agent:ceilometer-service
180 - ceilometer:ceilometer-service
181 - - ntp:juju-info
182 - nova-compute:juju-info
183 - - ntp:juju-info
184 - nova-cloud-controller:juju-info
185 - - ntp:juju-info
186 - neutron-gateway:juju-info
187 - - ntp:juju-info
188 - ceph:juju-info
189 - - ntp:juju-info
190 - cinder:juju-info
191 - - ntp:juju-info
192 - keystone:juju-info
193 - - ntp:juju-info
194 - glance:juju-info
195 - - ntp:juju-info
196 - swift-proxy:juju-info
197 - - ntp:juju-info
198 - swift-storage-z1:juju-info
199 - - ntp:juju-info
200 - swift-storage-z2:juju-info
201 - - ntp:juju-info
202 - ceilometer:juju-info
203 - - ntp:juju-info
204 - mongodb:juju-info
205 - - ntp:juju-info
206 - rabbitmq-server:juju-info
207 - - ntp:juju-info
208 - mysql:juju-info
209 - - ntp:juju-info
210 - openstack-dashboard:juju-info
211 - - landscape-client:container
212 - [ lds, neutron-gateway, ubuntu, mysql, cinder, keystone, rabbitmq-server, glance, openstack-dashboard, nova-cloud-controller, ceilometer, mongodb, nova-compute, ceph, swift-proxy, swift-storage-z1, swift-storage-z2 ]
213 - - landscape-client:registration
214 - lds
2150
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/juju-config'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/juju-config/environments.yaml'
--- usr/lib/orange-box/examples/openstack/complex/juju-config/environments.yaml 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/juju-config/environments.yaml 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
1default: openstack
2environments:
3 openstack:
4 type: openstack
5 control-bucket: __UUID__
6 admin-secret: Password1+
7 auth-url: __AUTH_URL__
8 region: RegionOne
9 image-metadata-url: http://10.14.4.1/images/
10 username: admin
11 password: Password1+
12 tenant-name: admin
13 use-floating-ip: true
140
=== removed file 'usr/lib/orange-box/examples/openstack/complex/juju-config/generate-jujuenv'
--- usr/lib/orange-box/examples/openstack/complex/juju-config/generate-jujuenv 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/juju-config/generate-jujuenv 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
1#!/bin/bash
2
3set -e
4
5grep openstack ~/.juju/environments.yaml && echo "Openstack already configured in ~/.juju/environments.yaml" && exit
6
7source ../openstack-configuration/envrc
8
9#Backup environments.yaml
10cp ~/.juju/environments.yaml ~/.juju/environments.yaml.bak
11
12sed -e "s/__UUID__/$(uuid)/g" -e "s!__AUTH_URL__!http://$KEYSTONE_HOST:5000/v2.0/!g" environments.yaml >> ~/.juju/environments.yaml
13
14echo "Default Juju environment is now: openstack"
15
16echo "Generating Juju meta-data"
17juju-metadata generate-image -a amd64 -u ${OS_AUTH_URL?} -i $IMAGE_UUID -r $OS_REGION_NAME -s precise
18
19echo "Copying data to web server"
20sudo cp -r images /var/www/html/
21sudo chmod -R go+r /var/www/html/images
22
23echo "Validating Juju Image Metadata"
24juju-metadata validate-images
25
26echo "Remove m1.tiny as it is too small for an Ubuntu Cloud Image and Juju defaults to the smallest flavor"
27nova flavor-list | grep m1.tiny && nova flavor-delete m1.tiny
28
29echo "Fixup DNS nameservers to point to 172.16.1.1 for Neutron subnets"
30#Get subnet IDs
31neutron subnet-update admin_net_subnet --dns_nameservers list=true 172.16.1.1
32neutron subnet-update ext_net_subnet --dns_nameservers list=true 172.16.1.1
33
34echo "Ready to bootstrap Juju"
35echo "juju bootstrap --upload-tools=true"
36
37
380
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/README'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/README 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/README 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
1OpenStack Cloud Setup and Test
2------------------------------
3
41) Inspect the deployed cloud
5
6./inspect-environment
7source envrc
8
92) Prepare the cloud
10
11./prepare-cloud havana
12source envrc
13
143) Verify the cloud
15
16./verify-cloud
17
18NOTES:
19
20verify-cloud currently clones devstack from github.
21
220
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/configure-tests'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/configure-tests 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/configure-tests 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1#!/bin/bash -e
2
3base=$(dirname $0)
4rm -rf etc
5cp -r ${base}/etc_master etc
6${base}/configure_tests.py --configure etc
70
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/configure_tests.py'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/configure_tests.py 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/configure_tests.py 1970-01-01 00:00:00 +0000
@@ -1,60 +0,0 @@
1#!/usr/bin/python
2
3import optparse
4import logging
5import os
6import sys
7import string
8import subprocess
9import re
10
11
12def list_configs(conf_dir):
13 confs = []
14 for f in os.listdir(conf_dir):
15 if os.path.isdir(os.path.join(conf_dir, f)):
16 confs += list_configs(os.path.join(conf_dir, f))
17 if f.endswith('.conf'):
18 confs.append(os.path.join(conf_dir, f))
19 return confs
20
21def update_test_configs(conf_dir):
22 if not os.path.exists(conf_dir):
23 die('Config directory does not exist at %s' % conf_dir)
24 vars_file = os.path.join(conf_dir, 'all_variables')
25 if not os.path.isfile(vars_file):
26 die('Could not load all_variables from %s' % vars_file)
27
28 env_vars = []
29 for l in open(vars_file, 'r').readlines():
30 if not l.startswith('#') and l.strip() != '':
31 env_vars.append(l.strip())
32
33 config_files = list_configs(conf_dir)
34
35 for var in env_vars:
36 if var in os.environ:
37 val = os.environ[var]
38 for f in config_files:
39 sep = ","
40 if re.search(",", val):
41 sep = "/"
42 cmd = 'sed -i s%(sep)s%%%(var)s%%%(sep)s%(val)s%(sep)sg %(f)s' % locals()
43 subprocess.check_output(cmd.split(' '))
44 else:
45 print "[WARN] Not setting %s in config, could not find in environment."\
46 % var
47 print "Configured tests in %s" % conf_dir
48
49parser = optparse.OptionParser()
50parser.add_option('-C', '--configure', dest='configure', action='store_true',
51 default=False,
52 help='Configure all test configs based on enviornment.')
53(options, args) = parser.parse_args()
54
55if options.configure:
56 if len(args) == 0:
57 die('Must pass a directory as argument to --configure')
58
59 conf_dir=args.pop()
60 update_test_configs(conf_dir)
610
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/__init__.py'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/config.py'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/config.py 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/config.py 1970-01-01 00:00:00 +0000
@@ -1,103 +0,0 @@
1import ConfigParser
2import os
3import subprocess
4import logging
5import jinja2
6
7from test_utils.config import CloudConfig
8
9cloud_config = CloudConfig()
10
11DEFAULT_CONFIG='etc/devstack.conf'
12DEFAULT_WORK_DIR=os.path.join(os.environ['HOME'], 'devstack-test')
13
14class DevstackConfig(object):
15 def __init__(self, conf=DEFAULT_CONFIG, work_dir=DEFAULT_WORK_DIR):
16 self.config = ConfigParser.SafeConfigParser()
17 self.config.read(conf)
18
19 self.work_dir = work_dir
20 if not os.path.exists(self.work_dir):
21 os.makedirs(self.work_dir)
22
23 self.devstack_dir = os.path.join(self.work_dir, 'devstack')
24 self.git_repo = self.config.get('DEFAULT', 'devstack_repo')
25
26 templ_dir = self.config.get('DEFAULT', 'templates')
27 templ_dir = os.path.join(os.getcwd(), templ_dir)
28 if not os.path.exists(templ_dir):
29 logging.error('Could not locate devstack template directory @ %s'\
30 % templ_dir)
31 raise
32 loader = jinja2.FileSystemLoader(templ_dir)
33 self.templates = jinja2.Environment(loader = loader)
34 self.git_branch = self.config.get('DEFAULT', 'devstack_branch')
35
36 def get(self, item, section='DEFAULT'):
37 return self.config.get(section, item)
38
39 def prepare_devstack(self):
40 self._clone_devstack(directory=self.devstack_dir)
41 self._write_openrc(branch=self.git_branch, directory=self.devstack_dir)
42 self._write_exerciserc()
43
44 def _clone_devstack(self, directory=None, branch=None):
45 if not directory:
46 directory = self.devstack_dir
47 if not branch:
48 branch = self.git_branch
49 cmd = [ 'git', 'clone', self.git_repo, directory ]
50 subprocess.check_output(cmd)
51
52 if branch != 'master':
53 os.chdir(directory)
54 cmd = [ 'git', 'checkout', branch ]
55 subprocess.check_output(cmd)
56
57 def _write_openrc(self, branch='master', directory=None):
58 ''' Write openrc template to specified directory.
59 branch is definied in config.
60 branch names are expected to be in git format.
61 _'s will be substited for /'s in template name,
62 ie, branch='stable/essex' -> $directory/openrc.stable_essex
63 '''
64 if not directory:
65 directory = self.devstack_dir
66 git_branch = ""
67 for i in branch:
68 if i == '/':
69 git_branch += '_'
70 else:
71 git_branch += i
72
73 openrc = os.path.join(directory, 'openrc')
74 templ = self.templates.get_template('openrc.%s' % git_branch)
75 context = { 'nova_host': cloud_config.get('DEFAULT', 'nova_host'),
76 'glance_host': cloud_config.get('DEFAULT', 'glance_host'),
77 'keystone_host': cloud_config.get('DEFAULT', 'keystone_host'),
78 'service_host': cloud_config.get('DEFAULT', 'service_host'),
79 'os_username': cloud_config.get('osapi', 'username'),
80 'os_password': cloud_config.get('osapi', 'password'),
81 'os_tenant_name': cloud_config.get('osapi', 'tenant_name'),
82 'secondary_ip_pool': self.get('secondary_ip_pool'),
83 'enabled_services': self.get('enabled_services')
84 }
85 f = open(openrc, 'w')
86 f.write(templ.render(context))
87 f.close()
88
89 def _write_exerciserc(self, directory=None):
90 ''' Write out the exerciserc file based on whats in config.'''
91 if not directory:
92 directory = self.devstack_dir
93 exerciserc = os.path.join(directory, 'exerciserc')
94 templ = self.templates.get_template('exerciserc')
95 context = { 'active_timeout': self.get('active_timeout'),
96 'associate_timeout': self.get('associate_timeout'),
97 'boot_timeout': self.get('boot_timeout'),
98 'running_timeout': self.get('running_timeout'),
99 'terminate_timeout': self.get('terminate_timeout')
100 }
101 f = open(exerciserc, 'w')
102 f.write(templ.render(context))
103 f.close()
1040
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_devstack_exercises.py'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_devstack_exercises.py 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_devstack_exercises.py 1970-01-01 00:00:00 +0000
@@ -1,105 +0,0 @@
1import unittest
2import shutil
3import os
4import nose
5import subprocess
6import sys
7import logging
8
9from test_utils.config import CloudConfig
10from config import DevstackConfig
11
12WORK_DIR='/tmp/devstack-test'
13
14cloud_config = CloudConfig()
15
16class DevstackExcercises(unittest.TestCase):
17 @classmethod
18 def setUpClass(self):
19 try:
20 self.artifacts_dir = cloud_config.get('tests', 'artifacts_dir')
21 except:
22 self.artifacts_dir = None
23 if self.artifacts_dir:
24 if os.path.isdir(self.artifacts_dir):
25 shutil.rmtree(self.artifacts_dir)
26 os.mkdir(self.artifacts_dir)
27 if os.path.exists(WORK_DIR):
28 logging.debug("Removing existing work_dir @ %s" % WORK_DIR)
29 shutil.rmtree(WORK_DIR)
30 self.devstack = DevstackConfig(work_dir=WORK_DIR)
31 self.devstack.prepare_devstack()
32
33
34 def _call_exercise(self, exercise):
35 os.chdir(self.devstack.devstack_dir)
36 exercise_script = './exercises/%s' % exercise
37
38 if not os.path.isfile(exercise_script):
39 # Skip exercise if it is not found (its probably hosted
40 # in another branch of devstack)
41 raise nose.SkipTest('Skipping %s, exercise script not found in '\
42 ' this branch.' % exercise_script)
43
44 try:
45 archive_logs = cloud_config.get('tests', 'archive_logs')
46 except:
47 archive_logs = False
48
49 if archive_logs in ['True', 'true']:
50 log = os.path.join(self.artifacts_dir, 'devstack_ex_%s.log' %\
51 exercise)
52 log = open(log, 'wb')
53 t_stdout = t_stderr = log
54 else:
55 t_stdout = t_stderr = subprocess.PIPE
56
57 p = subprocess.Popen(exercise_script,
58 stdout=t_stdout, stderr=t_stderr)
59 p.poll()
60 (stdout, stderr) = p.communicate()
61 if p.returncode == 0:
62 return True
63 elif p.returncode == 55:
64 # Exercises that return 55 do so because the target service is
65 # not enabled, via ENABLED_SERVICES.
66 raise nose.SkipTest('Service not enabled, skipping test.')
67 else:
68 logging.debug('--- Exercise %s failed with RC %s.'\
69 % (exercise, p.returncode))
70 logging.debug('Debug output:')
71 logging.debug(stdout)
72 logging.debug(stderr)
73 return False
74
75 def test_aggregates(self):
76 '''test_aggregates: Test host aggregates'''
77 self.assertTrue(self._call_exercise('aggregates.sh'))
78
79 def test_client_env(self):
80 '''test_client_env: Test OpenStack client enviroment variable handling'''
81 self.assertTrue(self._call_exercise('client-env.sh'))
82
83 def test_floating_ips(self):
84 '''test_floating_ips: Test instance spawn + IP association via OSAPI'''
85 self.assertTrue(self._call_exercise('floating_ips.sh'))
86
87 def test_volumes(self):
88 '''test_volumes: Test instance spawn + volume attachment via OSAPI'''
89 self.assertTrue(self._call_exercise('volumes.sh'))
90
91 def test_sec_groups(self):
92 '''test_sec_groups: Test security groups via the command line tools'''
93 self.assertTrue(self._call_exercise('sec_groups.sh'))
94
95 def test_horizon(self):
96 '''test_horizon: Ensure horizon displays a login page.'''
97 self.assertTrue(self._call_exercise('horizon.sh'))
98
99 def test_boot_from_volume(self):
100 '''test_boot_from_volume: Test instance spawn from cinder volume.'''
101 self.assertTrue(self._call_exercise('boot_from_volume.sh'))
102
103 def test_swift(self):
104 '''test_swift: Ensure swift object storage if functional.'''
105 self.assertTrue(self._call_exercise('swift.sh'))
1060
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/__init__.py'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/cloud.py'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/cloud.py 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/cloud.py 1970-01-01 00:00:00 +0000
@@ -1,351 +0,0 @@
1
2import json
3import urlparse
4import uuid
5import sys
6import time
7import logging
8from copy import copy, deepcopy
9
10from openstack_ubuntu_testing.test_utils.config import CloudConfig
11
12from boto import exception, connect_ec2
13from boto.ec2.regioninfo import RegionInfo
14
15from novaclient.v1_1.client import Client as OSNovaClient
16from cinderclient.v1.client import Client as OSCinderClient
17
18INST_RUN_TIMEOUT = 120
19INST_TERMINATE_TIMEOUT=60
20VOL_CREATE_TIMEOUT = 30
21VOL_ATTACH_TIMEOUT = 30
22
23def _normalize_ec2(d):
24 '''convert all values of dict to a string'''
25 out = {}
26 for k, v in out.iteritems():
27 if 'object at' in str(v):
28 out.pop(k)
29 elif isinstance(v, dict):
30 out[k] = _normalize_ec2(v)
31 else:
32 out[k] = str(v)
33 return out
34
35
36def _normalize_osapi(d):
37 '''
38 'ensure everythign in dict is a string, and remove any object references.
39 '''
40 out = {}
41 # these are known to hold references to objects in memory, remove them.
42 black_list = ['manager']
43 for k, v in d.iteritems():
44 if k in black_list:
45 continue
46 out[k] = str(v)
47 return out
48
49
50
51_resources = {
52 'ec2': {
53 'instances': [],
54 'floating_ips': [],
55 'key_pairs': [],
56 'volumes': [],
57 },
58 'osapi': {
59 'instances': [],
60 'floating_ips': [],
61 'key_pairs': [],
62 'volumes': [],
63 }
64}
65
66class EC2CloudClient(object):
67 def __init__(self, access_key, secret_key, endpoint):
68 url = urlparse.urlparse(endpoint)
69 sec = False
70 if url.scheme == 'https':
71 sec = True
72 region = RegionInfo(name='nova', endpoint=url.hostname)
73 self.api = connect_ec2(access_key, secret_key, host=url.hostname,
74 port=url.port, path=url.path, is_secure=sec,
75 region=region)
76
77 # track IDs of created resources for tear-down.
78 self.instances = []
79 self.key_pairs = []
80 self.floating_ips =[]
81 self.volumes = []
82
83 def instance_ids(self):
84 ids = []
85 for reservation in self.api.get_all_instances():
86 [ids.append(i.id) for i in reservation.instances]
87 return ids
88
89 def instances_running(self, instance_ids=[]):
90 '''given a list of instance_ids, return list of only running instances'''
91 running = []
92 reservations = []
93 for id in instance_ids:
94 try:
95 reservations.append(self.api.get_all_instances(instance_ids=str(id)))
96 except exception.EC2ResponseError:
97 instance_ids.remove(id)
98
99 instances = []
100 for r in reservations:
101 if len(r) > 0 and r[0].instances:
102 instances.append(r[0].instances[0])
103
104 for instance in instances:
105 if instance.state == 'running':
106 running.append(instance.id)
107 return running
108
109
110 def get_images(self):
111 images = {}
112 [images.update({i.id: _normalize_ec2(vars(i))})
113 for i in self.api.get_all_images()]
114 return images
115
116
117 def get_key_pairs(self):
118 kps = {}
119 [kps.update({k.name: _normalize_ec2(vars(k))})
120 for k in self.api.get_all_key_pairs()]
121 return kps
122
123
124 def get_instances(self):
125 insts = {}
126 for reservation in self.api.get_all_instances():
127 [insts.update({i.id: _normalize_ec2(vars(i))})
128 for i in reservation.instances]
129 return insts
130
131
132 def get_floating_ips(self):
133 ips = {}
134 [ips.update({ip.public_ip: _normalize_ec2(vars(ip))})
135 for ip in self.api.get_all_addresses()]
136 return ips
137
138
139 def get_volumes(self):
140 vols = {}
141 [vols.update({v.id: _normalize_ec2(vars(v))})
142 for v in self.api.get_all_volumes()]
143 return vols
144
145
146 def create_key_pair_and_instance(self):
147 '''
148 create a key_pair, launch an instance with it, wait for it
149 to start
150 '''
151 kp_name = 'upgrade_key_pair_%s' % uuid.uuid1()
152 kp = self.api.create_key_pair(key_name=kp_name)
153 self.key_pairs.append(kp_name)
154
155 imgs = self.api.get_all_images()
156 img_id = None
157 for img in imgs:
158 if img.id.startswith('ami-'):
159 img_id = img.id
160 break
161
162 res = self.api.run_instances(img_id, key_name=kp_name,
163 instance_type='m1.tiny')
164 time.sleep(1)
165 instance_id = res.instances[0].id
166 self.instances.append(instance_id)
167
168 timeout = 0
169
170 while instance_id not in self.instances_running([instance_id]):
171 time.sleep(1)
172 timeout += 1
173 if timeout >= INST_RUN_TIMEOUT:
174 logging.error('Timed out waiting for instance to run: %s' %\
175 instance_id)
176 raise Exception
177 logging.info('Instance running: %s' % instance_id)
178
179
180 def create_and_associate_floating_ip(self):
181 instance_id = self.instance_ids().pop()
182 address = self.api.allocate_address()
183 self.floating_ips.append(address.public_ip)
184 self.api.associate_address(instance_id, public_ip=address.public_ip)
185
186
187 def create_and_attach_volume(self):
188 instance_id = self.instance_ids().pop()
189 volume = self.api.create_volume(size=1, zone='nova')
190 self.volumes.append(volume.id)
191 time.sleep(1)
192 timeout = 0
193 while timeout <= VOL_CREATE_TIMEOUT:
194 vol = self.api.get_all_volumes(volume_ids=[volume.id])
195 if vol and vol[0].status == 'available':
196 break
197 timeout += 1
198 time.sleep(1)
199 print 'created vol: %s' %volume.id
200
201 self.api.attach_volume(volume_id=volume.id, instance_id=instance_id,
202 device='/dev/vdb')
203 timeout = 0
204 while timeout <= VOL_ATTACH_TIMEOUT:
205 vol = self.api.get_all_volumes(volume_ids=[volume.id])
206 if vol and vol[0].status == 'in-use':
207 break
208 timeout += 1
209 time.sleep(1)
210
211
212 def teardown(self):
213 self.api.terminate_instances(self.instances)
214 timeout = 0
215 while self.instances_running(self.instances):
216 if timeout >= INST_TERMINATE_TIMEOUT:
217 logging.error('Timeout waiting for instances terminate: %s' %\
218 self.instances)
219 raise Exception
220 timeout += 1
221 time.sleep(1)
222 [self.api.delete_key_pair(k) for k in self.key_pairs]
223 [self.api.release_address(ip)
224 for ip in self.floating_ips]
225 [self.api.delete_volume(vol) for vol in self.volumes]
226
227
228class OSAPICloudClient(object):
229 def __init__(self, username, password, tenant_name, auth_url):
230 self.compute_api = OSNovaClient(username, password,
231 tenant_name, auth_url, no_cache=True)
232 self.volume_api = OSCinderClient(username, password,
233 tenant_name, auth_url)
234 # track IDs of created resources for tear-down.
235 self.instances = []
236 self.key_pairs = []
237 self.floating_ips =[]
238 self.volumes = []
239
240 def instance_ids(self):
241 return [inst.id for inst in self.compute_api.servers.list()]
242
243 def instances_running(self, instance_ids=[]):
244 '''given a list of instance_ids, return list of only running instances'''
245 running = []
246 for id in instance_ids:
247 if id in [i.id for i in self.compute_api.servers.list()]:
248 running.append(id)
249
250 for id in running:
251 inst = self.compute_api.servers.get(id)
252 if inst.status != 'ACTIVE':
253 running.remove(id)
254 return running
255
256 def get_images(self):
257 images = {}
258 [images.update({i.id: _normalize_osapi(vars(i))})
259 for i in self.compute_api.images.list()]
260 return images
261
262 def get_key_pairs(self):
263 kps = {}
264 [kps.update({k.id: _normalize_osapi(vars(k))})
265 for k in self.compute_api.keypairs.list()]
266 return kps
267
268 def get_instances(self):
269 insts = {}
270 [insts.update({i.id: _normalize_osapi(vars(i))})
271 for i in self.compute_api.servers.list()]
272 return insts
273
274 def get_floating_ips(self):
275 ips = {}
276 [ips.update({i.id: _normalize_osapi(vars(i))})
277 for i in self.compute_api.floating_ips.list()]
278 return ips
279
280
281 def get_volumes(self):
282 vols = {}
283 [vols.update({v.id: _normalize_osapi(vars(v))})
284 for v in self.volume_api.volumes.list()]
285 return vols
286
287
288 def create_key_pair_and_instance(self):
289 kp_name = 'upgrade_key_pair_%s' % uuid.uuid1()
290 inst_name = 'upgrade_instance_%s' % uuid.uuid1()
291 image_id = self.get_images().keys().pop()
292 kp = self.compute_api.keypairs.create(name=kp_name)
293 instance = self.compute_api.servers.create(name=inst_name, flavor=1,
294 image=image_id,
295 key_name=kp_name)
296 timeout = 0
297 while self.compute_api.servers.get(instance.id).status != 'ACTIVE':
298 if timeout >= INST_RUN_TIMEOUT:
299 logging.error('Timed out waiting for instance to run: %s' %\
300 instance.name)
301 raise Exception
302 timeout += 1
303 time.sleep(1)
304
305 self.instances.append(instance.id)
306 self.key_pairs.append(kp_name)
307
308
309 def create_and_associate_floating_ip(self):
310 instance = self.compute_api.servers.list().pop()
311 floating_ip = self.compute_api.floating_ips.create()
312 self.floating_ips.append(floating_ip.ip)
313 instance.add_floating_ip(floating_ip.ip)
314
315
316 def create_and_attach_volume(self):
317 instance = self.compute_api.servers.list().pop()
318 volume = self.volume_api.volumes.create(size=1)
319 self.volumes.append(volume.id)
320 # TODO volume attach requires cinder.
321
322
323 def teardown(self):
324 for instance in self.instances:
325 self.compute_api.servers.delete(instance)
326
327 timeout = 0
328 while self.instances_running(self.instances):
329 if timeout >= INST_TERMINATE_TIMEOUT:
330 logging.error('Timeout waiting for instances terminate: %s' %\
331 self.instances)
332 raise Exception
333 timeout += 1
334 time.sleep(1)
335 [self.compute_api.keypairs.delete(kp)
336 for kp in self.key_pairs]
337 [self.volume_api.volumes.delete(v)
338 for v in self.volumes]
339
340
341def create_snapshot(client):
342 snapshot = {}
343 for collection in ['images', 'key_pairs', 'instances', 'floating_ips',
344 'volumes']:
345 f = 'get_%s' % collection
346 if not hasattr(client, f):
347 logging.warning('CloudClient (%s) does not implement %s' %\
348 (client, f))
349 f = getattr(client, f)
350 snapshot[collection] = f()
351 return snapshot
3520
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/config.py'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/config.py 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/config.py 1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
1
2import ConfigParser
3
4DEFAULT_CONFIG = 'etc/openstack.conf'
5
6
7class CloudConfig(object):
8 def __init__(self, conf=None):
9 if not conf:
10 conf = DEFAULT_CONFIG
11 self.config = ConfigParser.SafeConfigParser()
12 self.config.read(conf)
13
14 def get(self, section=None, item=None):
15 if not section:
16 section = 'DEFAULT'
17 return self.config.get(section, item)
18
19 def enabled_services(self):
20 '''translate ENABLED_SERVICES to corresponding juju OS service names.
21 '''
22 service_map = {
23 'n-api': 'nova-cloud-controller',
24 'n-crt': 'nova-cloud-controller',
25 'n-obj': 'nova-cloud-controller',
26 'n-sch': 'nova-cloud-controller',
27 'g-api': 'glance',
28 'g-reg': 'glance',
29 'key': 'keystone',
30 'cinder': 'cinder',
31 'c-api': 'cinder',
32 'c-vol': 'cinder',
33 'horizon': 'openstack-dashboard',
34 'n-net': 'nova-compute',
35 'quantum': 'quantum'
36 }
37 env = self.get('DEFAULT', 'enabled_services').split(',')
38 enabled_services = []
39 for svc in env:
40 try:
41 service = service_map[svc]
42 if service not in enabled_services:
43 enabled_services.append(service)
44 except KeyError:
45 pass
46 return enabled_services
470
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/juju'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/juju/__init__.py'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/juju/client.py'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/juju/client.py 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/juju/client.py 1970-01-01 00:00:00 +0000
@@ -1,190 +0,0 @@
1# Some simple helpers to wrap the juju client, mostly borrowed
2# from Kapil's charmrunner: lp:~hazmat/+junk/charmrunner
3
4import json
5import subprocess
6import logging
7import time
8import yaml
9
10
11class JujuTestClientException(Exception):
12 pass
13
14
15def call(juju_cmd, environment=None):
16 cmd = ['juju']
17 if environment:
18 cmd += ['-e', environment]
19 cmd += juju_cmd
20 logging.debug('Calling: %s' % ' '.join(cmd))
21 print 'juju client: %s' % cmd
22 subprocess.check_output(cmd)
23
24
25def destroy_environment(sudo=False):
26 logging.debug('Destroying environment.')
27 cmd = ['juju', 'destroy-environment', '-y']
28 if sudo:
29 cmd = ['sudo'] + cmd
30 p = subprocess.Popen(cmd,
31 stdout=subprocess.PIPE, stdin=subprocess.PIPE,
32 stderr=subprocess.PIPE)
33 print p.communicate(input='y\n')[0]
34
35
36def status(environment=None, with_stderr=False, timeout=None):
37 """Get a status dictionary.
38 """
39 args = ["juju", "status", "--format=json"]
40
41 if timeout:
42 args = ['timeout', str(timeout)] + args
43
44 if environment:
45 args += ['-e', environment]
46
47 if with_stderr:
48 output = subprocess.check_output(args, stderr=subprocess.STDOUT)
49 return output
50 else:
51 output = subprocess.check_output(args, stderr=open("/dev/null"))
52 return json.loads(output)
53
54
55def is_bootstrapped(environment=None, timeout=None):
56 try:
57 _status = status(environment=environment, with_stderr=False,
58 timeout=timeout)
59 except:
60 return False
61
62 try:
63 return _status['machines']['0']['agent-state'] == 'started'
64 except KeyError:
65 return False
66
67
68def deploy(repo_dir, charm, environment=None, service=None, config=None,
69 args=[]):
70 '''
71 Deploy a charm as a service.
72 '''
73 cmd = ["juju", "deploy",
74 "--repository", repo_dir]
75 if config:
76 cmd += ['--config=%s' % config]
77 if environment:
78 cmd += ['-e', environment]
79 [cmd.append(a) for a in args]
80 cmd += ["local:%s" % charm]
81 if service:
82 cmd += [service]
83 output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
84 logging.info("Deployed %s" % (service or charm))
85 return output
86
87
88def get_config(service):
89 args = ['juju', 'get', service]
90 output = subprocess.check_output(args, stderr=open('/dev/null'))
91 return yaml.load(output)
92
93
94def services(environment=None):
95 '''yield (name, address, state) for every service deployed. this assumes
96 a single machine unit per service'''
97 _status = status(environment)
98 for service, info in _status['services'].iteritems():
99 unit = info['units'].keys()[0]
100 m_id = str(info['units'][unit]['machine'])
101 try:
102 dns_name = _status['machines'][m_id]['dns-name']
103 except KeyError:
104 dns_name = None
105 state = info['units'][unit]['agent-state']
106 yield (service, dns_name, state)
107
108
109def get_machine_unit(service_name, environment=None):
110 for service, address, state in services(environment):
111 if service == service_name:
112 return address
113
114
115def instance_ids():
116 _status = status()
117 return [_status['machines'][n]['instance-id'] for n in _status['machines']]
118
119
120def ensure_bootstrap(environment=None, constraints=None, timeout=180,
121 sudo=False):
122 '''
123 Bootstrap and wait for a started environment within timeout specified.
124 Bootstrapping may require sudo access (ie, local provider)
125 '''
126
127 if is_bootstrapped(environment, timeout=5):
128 logging.info('Environment Already bootstrapped.')
129 return True
130
131 cmd = ['juju', 'bootstrap']
132 if environment:
133 cmd += ['-e', environment]
134 if constraints:
135 cmd += ['--constraints', constraints]
136
137 if sudo:
138 cmd = ['sudo'] + cmd
139
140 logging.info('Boostrapping new environment')
141 try:
142 subprocess.check_output(cmd)
143 except:
144 logging.error('Calling "juju bootstrap" failed!')
145
146 i = 0
147 while not is_bootstrapped(environment, timeout=5):
148 if i >= timeout:
149 logging.error('Juju bootstrap timeout.')
150 raise JujuTestClientException
151 time.sleep(1)
152 i += 1
153
154 return True
155
156
157def wait_for_state(service, state, environment=None, timeout=180):
158 logging.debug('Waiting for service %s to reach state %s.' %
159 (service, state))
160 i = 0
161 while True:
162 _status = status(environment)
163 if service not in _status['services']:
164 logging.error('wait_for_state: Could not find service ' + service)
165 raise JujuTestClientException
166 _st = list(set([_status['services'][service]['units'][u]['agent-state']
167 for u in _status['services'][service]['units']]))
168 if 'error' in _st:
169 logging.error('Unit error while waiting for %s to reach state %.'
170 % (service, state))
171 raise JujuTestClientException
172 if _st == [state]:
173 return True
174 if i >= timeout:
175 logging.error('Timeout waiting for service %s to reach state: %s' %
176 (service, state))
177 raise JujuTestClientException
178 time.sleep(1)
179 i += 1
180
181
182def service_machine_units(service, environment=None):
183 _status = status()
184 try:
185 _service = _status['services'][service]
186 except KeyError:
187 logging.error('Could not find machine units for unknown service %s' %
188 service)
189 raise JujuTestClientException
190 return [_service['units'][u]['machine'] for u in _service['units']]
1910
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/juju/juju_deployer.py'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/juju/juju_deployer.py 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/devstack/test_utils/juju/juju_deployer.py 1970-01-01 00:00:00 +0000
@@ -1,186 +0,0 @@
1import logging
2import os
3import paramiko
4import shutil
5import time
6import yaml
7
8from deployer.config import ConfigStack
9from deployer.action import importer
10from deployer.env import select_runtime
11from deployer.utils import setup_logging
12
13# SSH user for collecting log artifacts
14REMOTE_USER = 'ubuntu'
15
16# SSH Command to use for collecting artifacts on every node
17REMOTE_LOG_CMD = "sudo tar -czf /tmp/%s-%s-artifacts.tar.gz /etc /var/log"
18
19
20class Config(object):
21 # what juju-deployer would typically take as argparse
22 no_local_mods = False
23 update_charms = False
24 overrides = None
25 branch_only = False
26 timeout = 1800
27 watch = True
28 verbose = True
29 debug = True
30 rel_wait = 240
31 bootstrap = True
32 retry_count = None
33 deploy_delay = 0
34
35
36def run_deployer(environment, configs, deployment, **kwargs):
37 '''
38 Uses juju-deployer to deploy a deployment from a given config(s)
39 into an already deployed environment.
40
41 Example usage:
42 run_deployer(
43 environment='precise',
44 configs=['/tmp/base.cfg'],
45 deployment='precise-grizzly',
46 debug=True, verbose=True
47 )
48 '''
49 opts = Config()
50
51 setup_logging(
52 verbose=kwargs.get('verbose', False),
53 debug=kwargs.get('debug', False),
54 )
55
56 if 'overrides' in kwargs:
57 opts.overrides = kwargs['overrides']
58
59 for conf in configs:
60 if not os.path.isfile(conf):
61 e = 'Could not find deployment config @ %s.' % conf
62 raise Exception(e)
63
64 env = select_runtime(environment, opts)
65 config = ConfigStack(configs)
66 deploy = config.get(deployment)
67 importer.Importer(env, deploy, options=opts).run()
68
69
70def reset(environment):
71 env = select_runtime(environment, Config())
72 env.connect()
73 env.reset(terminate_machines=True, terminate_delay=6, watch=True,
74 timeout=600)
75
76
77def locate_machine(status, machine_id):
78 '''determine service unit assigned to machine id'''
79 if machine_id == '0':
80 return 'bootstrap-machine-0'
81 services = status['services']
82 for unit in [services[k]['units'] for k in services.iterkeys()]:
83 if machine_id in [u['machine'] for u in unit.itervalues()]:
84 return [k for k in unit.iterkeys()][0].replace('/', '-')
85 return None
86
87
88def hosts_services(status):
89 machines = []
90 for id, machine in status['machines'].iteritems():
91 if 'dns-name' not in machine:
92 logging.error('Machine %s has no dns-name.' % id)
93 logging.error(machine)
94 continue
95 m = {'id': id, 'dns-name': machine['dns-name']}
96 machines.append(m)
97 [m.update({'service': locate_machine(status, m['id'])})
98 for m in machines]
99 return machines
100
101
102def collect_artifacts(environment, outdir):
103 if not os.path.exists(outdir):
104 os.makedirs(outdir)
105 if not os.path.isdir(outdir):
106 raise Exception('%s exists but is not a directory.' % outdir)
107
108 env = select_runtime(environment, Config())
109
110 conns = {}
111 hosts = hosts_services(env.get_cli_status())
112
113 logging.info('Collecting artifacts from %s.' %
114 [h['dns-name'] for h in hosts])
115
116 for host in hosts:
117 hn = host['dns-name']
118
119 conns[hn] = {}
120 conns[hn]['ssh'] = paramiko.SSHClient()
121 conns[hn]['ssh'].set_missing_host_key_policy(paramiko.AutoAddPolicy())
122
123 try:
124 conns[hn]['ssh'].connect(hn, username=REMOTE_USER)
125 conns[hn]['sftp'] = conns[hn]['ssh'].open_sftp()
126 except Exception as e:
127 raise Exception('Could not setup ssh connection to %s: %s' %
128 (hn, e))
129
130 for host in hosts:
131 hn = host['dns-name']
132 svc = host['service']
133 cmd = REMOTE_LOG_CMD % (svc, hn)
134 try:
135 conns[hn]['ssh'].exec_command(cmd)
136 except Exception as e:
137 logging.error('Could not execute remote log cmd on '
138 'host %s: %s' % (hn, cmd))
139 raise e
140
141 # sleep for 5, allow all hosts to finish tarring.
142 time.sleep(5)
143
144 for host in hosts:
145 hn = host['dns-name']
146 svc = host['service']
147 try:
148 tgz = '%s-%s-artifacts.tar.gz' % (svc, hn)
149 conns[hn]['sftp'].get(
150 os.path.join('/tmp', tgz), os.path.join(outdir, tgz))
151 except Exception as e:
152 logging.error('Could not collect artifacts from %s:%s' %
153 (hn, tgz))
154 raise e
155
156 # collect the local maas logs if they exist
157 if os.path.isdir('/var/log/maas'):
158 for log in ['maas.log', 'pserv.log']:
159 l = os.path.join('/var/log/maas', log)
160 if os.path.isfile(l):
161 shutil.copy(l, outdir)
162
163 # dump current juju status
164 with open(os.path.join(outdir, 'juju_status.yaml'), 'w') as out:
165 out.write(yaml.dump(env.get_cli_status()))
166
167
168class DeployerTest(object):
169 def __init__(self):
170 self.config = None
171
172 def deploy(self, env=None):
173 env = env or self.config.get('ubuntu_release')
174 run_deployer(environment=env,
175 configs=[self.config.get('deployment_config')],
176 deployment=self.config.get('deployment'),
177 overrides=self.config.get('overrides'),
178 debug=True, verbose=True)
179
180 def reset_environment(self, env=None):
181 _env = env or self.config.get('ubuntu_release')
182 reset(_env)
183
184 def collect_artifacts(self, env, outdir):
185 _env = env or self.config.get('ubuntu_release')
186 collect_artifacts(_env, outdir)
1870
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/all_variables'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/all_variables 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/all_variables 1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
1# List of all place holders used in any of the test configs.
2# 'run_tests.py --configure' will reference this, and update
3# configs according to what is available in environment.
4# Putting this here and into run_tests.py keeps the Jenkins
5# jobs slim and clean.
6
7# openstack.conf
8NOVA_HOST
9GLANCE_HOST
10KEYSTONE_HOST
11CINDER_HOST
12QUANTUM_HOST
13NOVA_COMPUTE_HOST
14NOVA_VOLUME_HOST
15ADMIN_TOKEN
16IMAGE_UUID
17IMAGE_NAME
18EC2_ACCESS_KEY
19EC2_SECRET_KEY
20EC2_URL
21S3_URL
22EC2_AMI_ID
23OS_USERNAME
24OS_PASSWORD
25OS_AUTH_URL
26OS_TENANT_NAME
27HORIZON_HOST
28ENABLED_SERVICES
29
30# devstack.conf
31ENABLED_SERVICES
320
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack.conf'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack.conf 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack.conf 1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
1[DEFAULT]
2templates=etc/devstack_templates/
3devstack_repo=https://github.com/openstack-dev/devstack.git
4devstack_branch=stable/havana
5enabled_services=%ENABLED_SERVICES%
6active_timeout=60
7associate_timeout=60
8boot_timeout=60
9running_timeout=120
10terminate_timeout=60
11secondary_ip_pool=test_range
120
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/exerciserc'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/exerciserc 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/exerciserc 1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
1#!/usr/bin/env bash
2#
3# source exerciserc
4#
5# Configure the DevStack exercise scripts
6# For best results, source this _after_ stackrc/localrc as it will set
7# values only if they are not already set.
8
9# Max time to wait while vm goes from build to active state
10export ACTIVE_TIMEOUT={{ active_timeout }}
11# Max time to wait for proper IP association and dis-association.
12export ASSOCIATE_TIMEOUT={{ associate_timeout }}
13
14# Max time till the vm is bootable
15export BOOT_TIMEOUT={{ boot_timeout }}
16
17# Max time from run instance command until it is running
18export RUNNING_TIMEOUT={{ running_timeout }}
19
20# Max time to wait for a vm to terminate
21export TERMINATE_TIMEOUT={{ terminate_timeout }}
22
23# Max time to wait for a euca-volume command to propogate
24export VOLUME_TIMEOUT=${VOLUME_TIMEOUT:-30}
25
26# Max time to wait for a euca-delete command to propogate
27export VOLUME_DELETE_TIMEOUT=${SNAPSHOT_DELETE_TIMEOUT:-60}
28
29# The size of the volume we want to boot from; some storage back-ends
30# do not allow a disk resize, so it's important that this can be tuned
31export DEFAULT_VOLUME_SIZE=${DEFAULT_VOLUME_SIZE:-1}
32
330
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.master'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.master 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.master 1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
1
2###########################
3# Ubuntu CI Lab Settings
4###########################
5
6# List of all enabled services, compiled by inspect_environment.sh
7# and set in etc/tests/devstack.conf
8ENABLED_SERVICES={{ enabled_services }}
9
10# volumes + floating_ips test checks this when determining whether
11# or not it should try to ping internal IPs
12MULTI_HOST=1
13
14# The second pool of floating ips, created during jenkins
15# via /var/lib/jenkins/tools/jenkins-scripts/prepare_cloud.sh
16TEST_FLOATING_POOL={{ secondary_ip_pool }}
17
18# Should point to keystone
19HOST_IP={{ keystone_host }}
20SERVICE_HOST=${SERVICE_HOST:-$HOST_IP}
21
22# Needed because tests use glance client directly
23GLANCE_HOST={{ glance_host }}
24
25PRIVATE_NETWORK_NAME="private network"
26
27# These get created by the Keystone charm during deployment.
28# They are set as config options to the charm
29export NOVA_PROJECT_ID={{ os_tenant_name }}
30export NOVA_USERNAME={{ os_username }}
31export NOVA_PASSWORD={{ os_password }}
32
33# Commit 10670d1bad6b4afd3dce9af61d22c8cd5eeded59 changed keystone token
34# auth so that they use OS_ env. variables, but doesn't translate
35# properly from existing NOVA_ ones
36export OS_TENANT_NAME=$NOVA_PROJECT_ID
37export OS_USERNAME=$NOVA_USERNAME
38export OS_PASSWORD=$NOVA_PASSWORD
39export OS_AUTH_URL="http://$HOST_IP:5000/v2.0/"
40
41# Set the ec2 url so euca2ools works
42export EC2_URL="http://{{ nova_host }}:8773/services/Cloud"
43
44# Also set s3 url for bundle testing
45export S3_URL="http://{{ nova_host }}:3333"
46
47# Specify what image to parse out of 'glance index' so we don't accidentally
48# try spawning the test, null AMI that the bundle test publishses.
49# DISABLED: setting this actually throws off devstack's regexp
50# and the test sometimes boots an AKI instead of AMI.
51#export DEFAULT_IMAGE_NAME="cirros-0.3.0-x86_64-uec-ami"
52
53# Bumped these timeouts to 60, bump higher if we decide to use
54# cloud images instead of ttylinux
55# Max time till the vm is bootable
56export BOOT_TIMEOUT=60
57# Max time to wait while vm goes from build to active state
58export ACTIVE_TIMEOUT=60
59
60# Timeout for instance termination
61export TERMINATE_TIMEOUT=30
62
63# Disable use of python-keyring during tests.
64export OS_NO_CACHE=1
65
66###########################
67# Devstack defaults
68###########################
69
70# With the addition of Keystone, to use an openstack cloud you should
71# authenticate against keystone, which returns a **Token** and **Service
72# Catalog**. The catalog contains the endpoint for all services the user/tenant
73# has access to - including nova, glance, keystone, swift, ... We currently
74# recommend using the 2.0 *auth api*.
75#
76# *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0. We
77# will use the 1.1 *compute api*
78export NOVA_URL=${NOVA_URL:-http://$SERVICE_HOST:5000/v2.0/}
79
80# Currently novaclient needs you to specify the *compute api* version. This
81# needs to match the config of your catalog returned by Keystone.
82export NOVA_VERSION=${NOVA_VERSION:-1.1}
83
84# FIXME - why does this need to be specified?
85export NOVA_REGION_NAME=${NOVA_REGION_NAME:-RegionOne}
86
87# Euca2ools Certificate stuff for uploading bundles
88# You can get your certs using ./tools/get_certs.sh
89NOVARC=$(readlink -f "${BASH_SOURCE:-${0}}" 2>/dev/null) ||
90 NOVARC=$(python -c 'import os,sys; print os.path.abspath(os.path.realpath(sys.argv[1]))' "${BASH_SOURCE:-${0}}")
91NOVA_KEY_DIR=${NOVARC%/*}
92# Override this above, since devstack seems to use SERVICE_HOST to describe
93# both the nova host + keystone
94#export S3_URL=http://$SERVICE_HOST:3333
95export EC2_USER_ID=42 # nova does not use user id, but bundling requires it
96export EC2_PRIVATE_KEY=${NOVA_KEY_DIR}/pk.pem
97export EC2_CERT=${NOVA_KEY_DIR}/cert.pem
98export NOVA_CERT=${NOVA_KEY_DIR}/cacert.pem
99export EUCALYPTUS_CERT=${NOVA_CERT} # euca-bundle-image seems to require this set
100alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user 42 --ec2cert ${NOVA_CERT}"
101alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"
102
103# set log level to DEBUG (helps debug issues)
104# export NOVACLIENT_DEBUG=1
105
106# Max time from run instance command until it is running
107export RUNNING_TIMEOUT=${RUNNING_TIMEOUT:-$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))}
108
109# Max time to wait for proper IP association and dis-association.
110export ASSOCIATE_TIMEOUT=${ASSOCIATE_TIMEOUT:-15}
1110
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_essex'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_essex 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_essex 1970-01-01 00:00:00 +0000
@@ -1,100 +0,0 @@
1
2###########################
3# Ubuntu CI Lab Settings
4###########################
5# stable/essex
6# volumes + floating_ips test checks this when determining whether
7# or not it should try to ping internal IPs
8MULTI_HOST=1
9
10# The second pool of floating ips, created during jenkins
11# via /var/lib/jenkins/tools/jenkins-scripts/prepare_cloud.sh
12TEST_FLOATING_POOL={{ secondary_ip_pool }}
13
14# Should point to keystone
15HOST_IP={{ keystone_host }}
16SERVICE_HOST=${SERVICE_HOST:-$HOST_IP}
17
18# Needed because tests use glance client directly
19GLANCE_HOST={{ glance_host }}
20
21# These get created by the Keystone charm during deployment.
22# They are set as config options to the charm
23export NOVA_PROJECT_ID={{ os_tenant_name }}
24export NOVA_USERNAME={{ os_username }}
25export NOVA_PASSWORD={{ os_password }}
26
27# Commit 10670d1bad6b4afd3dce9af61d22c8cd5eeded59 changed keystone token
28# auth so that they use OS_ env. variables, but doesn't translate
29# properly from existing NOVA_ ones
30export OS_TENANT_NAME=$NOVA_PROJECT_ID
31export OS_USERNAME=$NOVA_USERNAME
32export OS_PASSWORD=$NOVA_PASSWORD
33export OS_AUTH_URL="http://$HOST_IP:5000/v2.0/"
34
35# Set the ec2 url so euca2ools works
36export EC2_URL="http://{{ nova_host }}:8773/services/Cloud"
37
38# Also set s3 url for bundle testing
39export S3_URL="http://{{ nova_host }}:3333"
40
41# Specify what image to parse out of 'glance index' so we don't accidentally
42# try spawning the test, null AMI that the bundle test publishses.
43# DISABLED: setting this actually throws off devstack's regexp
44# and the test sometimes boots an AKI instead of AMI.
45#export DEFAULT_IMAGE_NAME="cirros-0.3.0-x86_64-uec-ami"
46
47# Bumped these timeouts to 60, bump higher if we decide to use
48# cloud images instead of ttylinux
49# Max time till the vm is bootable
50export BOOT_TIMEOUT=60
51# Max time to wait while vm goes from build to active state
52export ACTIVE_TIMEOUT=60
53
54# Timeout for instance termination
55export TERMINATE_TIMEOUT=30
56###########################
57# Devstack defaults
58###########################
59
60# With the addition of Keystone, to use an openstack cloud you should
61# authenticate against keystone, which returns a **Token** and **Service
62# Catalog**. The catalog contains the endpoint for all services the user/tenant
63# has access to - including nova, glance, keystone, swift, ... We currently
64# recommend using the 2.0 *auth api*.
65#
66# *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0. We
67# will use the 1.1 *compute api*
68export NOVA_URL=${NOVA_URL:-http://$SERVICE_HOST:5000/v2.0/}
69
70# Currently novaclient needs you to specify the *compute api* version. This
71# needs to match the config of your catalog returned by Keystone.
72export NOVA_VERSION=${NOVA_VERSION:-1.1}
73
74# FIXME - why does this need to be specified?
75export NOVA_REGION_NAME=${NOVA_REGION_NAME:-RegionOne}
76
77# Euca2ools Certificate stuff for uploading bundles
78# You can get your certs using ./tools/get_certs.sh
79NOVARC=$(readlink -f "${BASH_SOURCE:-${0}}" 2>/dev/null) ||
80 NOVARC=$(python -c 'import os,sys; print os.path.abspath(os.path.realpath(sys.argv[1]))' "${BASH_SOURCE:-${0}}")
81NOVA_KEY_DIR=${NOVARC%/*}
82# Override this above, since devstack seems to use SERVICE_HOST to describe
83# both the nova host + keystone
84#export S3_URL=http://$SERVICE_HOST:3333
85export EC2_USER_ID=42 # nova does not use user id, but bundling requires it
86export EC2_PRIVATE_KEY=${NOVA_KEY_DIR}/pk.pem
87export EC2_CERT=${NOVA_KEY_DIR}/cert.pem
88export NOVA_CERT=${NOVA_KEY_DIR}/cacert.pem
89export EUCALYPTUS_CERT=${NOVA_CERT} # euca-bundle-image seems to require this set
90alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user 42 --ec2cert ${NOVA_CERT}"
91alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"
92
93# set log level to DEBUG (helps debug issues)
94# export NOVACLIENT_DEBUG=1
95
96# Max time from run instance command until it is running
97export RUNNING_TIMEOUT=${RUNNING_TIMEOUT:-$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))}
98
99# Max time to wait for proper IP association and dis-association.
100export ASSOCIATE_TIMEOUT=${ASSOCIATE_TIMEOUT:-15}
1010
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_folsom'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_folsom 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_folsom 1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
1
2###########################
3# Ubuntu CI Lab Settings
4###########################
5
6# List of all enabled services, compiled by inspect_environment.sh
7# and set in etc/tests/devstack.conf
8ENABLED_SERVICES={{ enabled_services }}
9
10# volumes + floating_ips test checks this when determining whether
11# or not it should try to ping internal IPs
12MULTI_HOST=1
13
14# The second pool of floating ips, created during jenkins
15# via /var/lib/jenkins/tools/jenkins-scripts/prepare_cloud.sh
16TEST_FLOATING_POOL={{ secondary_ip_pool }}
17
18# Should point to keystone
19HOST_IP={{ keystone_host }}
20SERVICE_HOST=${SERVICE_HOST:-$HOST_IP}
21
22# Needed because tests use glance client directly
23GLANCE_HOST={{ glance_host }}
24
25PRIVATE_NETWORK_NAME="private network"
26
27# These get created by the Keystone charm during deployment.
28# They are set as config options to the charm
29export NOVA_PROJECT_ID={{ os_tenant_name }}
30export NOVA_USERNAME={{ os_username }}
31export NOVA_PASSWORD={{ os_password }}
32
33# Commit 10670d1bad6b4afd3dce9af61d22c8cd5eeded59 changed keystone token
34# auth so that they use OS_ env. variables, but doesn't translate
35# properly from existing NOVA_ ones
36export OS_TENANT_NAME=$NOVA_PROJECT_ID
37export OS_USERNAME=$NOVA_USERNAME
38export OS_PASSWORD=$NOVA_PASSWORD
39export OS_AUTH_URL="http://$HOST_IP:5000/v2.0/"
40
41# Set the ec2 url so euca2ools works
42export EC2_URL="http://{{ nova_host }}:8773/services/Cloud"
43
44# Also set s3 url for bundle testing
45export S3_URL="http://{{ nova_host }}:3333"
46
47# Specify what image to parse out of 'glance index' so we don't accidentally
48# try spawning the test, null AMI that the bundle test publishses.
49# DISABLED: setting this actually throws off devstack's regexp
50# and the test sometimes boots an AKI instead of AMI.
51#export DEFAULT_IMAGE_NAME="cirros-0.3.0-x86_64-uec-ami"
52
53# Bumped these timeouts to 60, bump higher if we decide to use
54# cloud images instead of ttylinux
55# Max time till the vm is bootable
56export BOOT_TIMEOUT=60
57# Max time to wait while vm goes from build to active state
58export ACTIVE_TIMEOUT=60
59
60# Timeout for instance termination
61export TERMINATE_TIMEOUT=30
62
63# Disable use of python-keyring during tests.
64export OS_NO_CACHE=1
65
66###########################
67# Devstack defaults
68###########################
69
70# With the addition of Keystone, to use an openstack cloud you should
71# authenticate against keystone, which returns a **Token** and **Service
72# Catalog**. The catalog contains the endpoint for all services the user/tenant
73# has access to - including nova, glance, keystone, swift, ... We currently
74# recommend using the 2.0 *auth api*.
75#
76# *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0. We
77# will use the 1.1 *compute api*
78export NOVA_URL=${NOVA_URL:-http://$SERVICE_HOST:5000/v2.0/}
79
80# Currently novaclient needs you to specify the *compute api* version. This
81# needs to match the config of your catalog returned by Keystone.
82export NOVA_VERSION=${NOVA_VERSION:-1.1}
83
84# FIXME - why does this need to be specified?
85export NOVA_REGION_NAME=${NOVA_REGION_NAME:-RegionOne}
86
87# Euca2ools Certificate stuff for uploading bundles
88# You can get your certs using ./tools/get_certs.sh
89NOVARC=$(readlink -f "${BASH_SOURCE:-${0}}" 2>/dev/null) ||
90 NOVARC=$(python -c 'import os,sys; print os.path.abspath(os.path.realpath(sys.argv[1]))' "${BASH_SOURCE:-${0}}")
91NOVA_KEY_DIR=${NOVARC%/*}
92# Override this above, since devstack seems to use SERVICE_HOST to describe
93# both the nova host + keystone
94#export S3_URL=http://$SERVICE_HOST:3333
95export EC2_USER_ID=42 # nova does not use user id, but bundling requires it
96export EC2_PRIVATE_KEY=${NOVA_KEY_DIR}/pk.pem
97export EC2_CERT=${NOVA_KEY_DIR}/cert.pem
98export NOVA_CERT=${NOVA_KEY_DIR}/cacert.pem
99export EUCALYPTUS_CERT=${NOVA_CERT} # euca-bundle-image seems to require this set
100alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user 42 --ec2cert ${NOVA_CERT}"
101alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"
102
103# set log level to DEBUG (helps debug issues)
104# export NOVACLIENT_DEBUG=1
105
106# Max time from run instance command until it is running
107export RUNNING_TIMEOUT=${RUNNING_TIMEOUT:-$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))}
108
109# Max time to wait for proper IP association and dis-association.
110export ASSOCIATE_TIMEOUT=${ASSOCIATE_TIMEOUT:-15}
1110
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_havana'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_havana 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/devstack_templates/openrc.stable_havana 1970-01-01 00:00:00 +0000
@@ -1,112 +0,0 @@
1
2###########################
3# Ubuntu CI Lab Settings
4###########################
5
6# List of all enabled services, compiled by inspect_environment.sh
7# and set in etc/tests/devstack.conf
8ENABLED_SERVICES={{ enabled_services }}
9
10# volumes + floating_ips test checks this when determining whether
11# or not it should try to ping internal IPs
12MULTI_HOST=1
13
14# The second pool of floating ips, created during jenkins
15# via /var/lib/jenkins/tools/jenkins-scripts/prepare_cloud.sh
16TEST_FLOATING_POOL={{ secondary_ip_pool }}
17
18# Should point to keystone
19HOST_IP={{ keystone_host }}
20SERVICE_HOST={{ service_host }}
21
22# Needed because tests use glance client directly
23GLANCE_HOST={{ glance_host }}
24
25PRIVATE_NETWORK_NAME="admin_net network"
26DEFAULT_FLOATING_POOL="ext_net"
27DEFAULT_INSTANCE_TYPE="m1.small"
28
29# These get created by the Keystone charm during deployment.
30# They are set as config options to the charm
31export NOVA_PROJECT_ID={{ os_tenant_name }}
32export NOVA_USERNAME={{ os_username }}
33export NOVA_PASSWORD={{ os_password }}
34
35# Commit 10670d1bad6b4afd3dce9af61d22c8cd5eeded59 changed keystone token
36# auth so that they use OS_ env. variables, but doesn't translate
37# properly from existing NOVA_ ones
38export OS_TENANT_NAME=$NOVA_PROJECT_ID
39export OS_USERNAME=$NOVA_USERNAME
40export OS_PASSWORD=$NOVA_PASSWORD
41export OS_AUTH_URL="http://$HOST_IP:5000/v2.0/"
42
43# Set the ec2 url so euca2ools works
44export EC2_URL="http://{{ nova_host }}:8773/services/Cloud"
45
46# Also set s3 url for bundle testing
47export S3_URL="http://{{ nova_host }}:3333"
48
49# Specify what image to parse out of 'glance index' so we don't accidentally
50# try spawning the test, null AMI that the bundle test publishses.
51# DISABLED: setting this actually throws off devstack's regexp
52# and the test sometimes boots an AKI instead of AMI.
53#export DEFAULT_IMAGE_NAME="cirros-0.3.0-x86_64-uec-ami"
54
55# Bumped these timeouts to 60, bump higher if we decide to use
56# cloud images instead of ttylinux
57# Max time till the vm is bootable
58export BOOT_TIMEOUT=60
59# Max time to wait while vm goes from build to active state
60export ACTIVE_TIMEOUT=60
61
62# Timeout for instance termination
63export TERMINATE_TIMEOUT=30
64
65# Disable use of python-keyring during tests.
66export OS_NO_CACHE=1
67
68###########################
69# Devstack defaults
70###########################
71
72# With the addition of Keystone, to use an openstack cloud you should
73# authenticate against keystone, which returns a **Token** and **Service
74# Catalog**. The catalog contains the endpoint for all services the user/tenant
75# has access to - including nova, glance, keystone, swift, ... We currently
76# recommend using the 2.0 *auth api*.
77#
78# *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0. We
79# will use the 1.1 *compute api*
80export NOVA_URL=${NOVA_URL:-http://$SERVICE_HOST:5000/v2.0/}
81
82# Currently novaclient needs you to specify the *compute api* version. This
83# needs to match the config of your catalog returned by Keystone.
84export NOVA_VERSION=${NOVA_VERSION:-1.1}
85
86# FIXME - why does this need to be specified?
87export NOVA_REGION_NAME=${NOVA_REGION_NAME:-RegionOne}
88
89# Euca2ools Certificate stuff for uploading bundles
90# You can get your certs using ./tools/get_certs.sh
91NOVARC=$(readlink -f "${BASH_SOURCE:-${0}}" 2>/dev/null) ||
92 NOVARC=$(python -c 'import os,sys; print os.path.abspath(os.path.realpath(sys.argv[1]))' "${BASH_SOURCE:-${0}}")
93NOVA_KEY_DIR=${NOVARC%/*}
94# Override this above, since devstack seems to use SERVICE_HOST to describe
95# both the nova host + keystone
96#export S3_URL=http://$SERVICE_HOST:3333
97export EC2_USER_ID=42 # nova does not use user id, but bundling requires it
98export EC2_PRIVATE_KEY=${NOVA_KEY_DIR}/pk.pem
99export EC2_CERT=${NOVA_KEY_DIR}/cert.pem
100export NOVA_CERT=${NOVA_KEY_DIR}/cacert.pem
101export EUCALYPTUS_CERT=${NOVA_CERT} # euca-bundle-image seems to require this set
102alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user 42 --ec2cert ${NOVA_CERT}"
103alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"
104
105# set log level to DEBUG (helps debug issues)
106# export NOVACLIENT_DEBUG=1
107
108# Max time from run instance command until it is running
109export RUNNING_TIMEOUT=${RUNNING_TIMEOUT:-$(($BOOT_TIMEOUT + $ACTIVE_TIMEOUT))}
110
111# Max time to wait for proper IP association and dis-association.
112export ASSOCIATE_TIMEOUT=${ASSOCIATE_TIMEOUT:-15}
1130
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/openstack.conf'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/openstack.conf 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/etc_master/openstack.conf 1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
1[DEFAULT]
2nova_host=%NOVA_HOST%
3nova_compute_host=%NOVA_COMPUTE_HOST%
4nova_volume_host=%NOVA_VOLUME_HOST%
5glance_host=%GLANCE_HOST%
6keystone_host=%KEYSTONE_HOST%
7cinder_host=%CINDER_HOST%
8quantum_host=%QUANTUM_HOST%
9service_host=%HORIZON_HOST%
10glance_image_uuid=%IMAGE_UUID%
11glance_image_name=%IMAGE_NAME%
12admin_token=%ADMIN_TOKEN%
13enabled_services=%ENABLED_SERVICES%
14
15[ec2]
16access_key=%EC2_ACCESS_KEY%
17secret_key=%EC2_SECRET_KEY%
18ec2_url=%EC2_URL%
19s3_url=%S3_URL%
20ec2_ami_id=%EC2_AMI_ID%
21
22[osapi]
23username=%OS_USERNAME%
24password=%OS_PASSWORD%
25auth_url=%OS_AUTH_URL%
26tenant_name=%OS_TENANT_NAME%
270
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/get-cloud-images'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/get-cloud-images 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/get-cloud-images 1970-01-01 00:00:00 +0000
@@ -1,4 +0,0 @@
1#!/bin/bash -e
2
3mkdir -p ~/images
4wget -O ~/images/precise-server-cloudimg-amd64-disk1.img http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img
50
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/inspect-environment'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/inspect-environment 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/inspect-environment 1970-01-01 00:00:00 +0000
@@ -1,187 +0,0 @@
1#!/bin/bash
2# Generate an envrc to be sourced and used by all tests (and possibly humans).
3#
4# - Using juju-deployer, determine where all services ended up.
5# - With the admin credentials configured in juju's deployment configs,
6# generate EC2 credentials.
7# - Dump everything into envrc using names compatable with client tools
8#
9# Additionally dump anything else needed for test suite configurations. See
10# etc/tests/all_variables for a list of what should be set in envrc.
11#
12# Also collect all package version from the nodes, save in a text file.
13# Both envrc and versions_tested are to be used as file parameters to
14# Jenkins test jobs.
15
16echo "Inspecting deployed environment."
17# Discover where the services ended up
18NOVA_HOST=$(juju-deployer -f nova-cloud-controller 2>/dev/null)
19GLANCE_HOST=$(juju-deployer -f glance 2>/dev/null)
20KEYSTONE_HOST=$(juju-deployer -f keystone 2>/dev/null)
21NOVA_VOLUME_HOST=$(juju-deployer -f nova-volume 2>/dev/null)
22CINDER_HOST=$(juju-deployer -f cinder 2>/dev/null)
23NOVA_COMPUTE_HOST=$(juju-deployer -f nova-compute 2>/dev/null)
24NEUTRON_HOST=$(juju-deployer -f neutron-gateway 2>/dev/null)
25QUANTUM_HOST=$(juju-deployer -f quantum-gateway 2>/dev/null)
26HORIZON_HOST=$(juju-deployer -f openstack-dashboard 2>/dev/null)
27CEPH_HOST=$(juju-deployer -f ceph 2>/dev/null)
28SWIFT_HOST=$(juju-deployer -f swift-proxy 2>/dev/null)
29NOVA_VMWARE_HOST=$(juju-deployer -f nova-vmware 2>/dev/null)
30
31# Handle the quantum -> neutron rename.
32[[ -n "$NEUTRON_HOST" ]] && QUANTUM_HOST="$NEUTRON_HOST"
33
34# Ensure essential hosts are present, and build ENABLED_SERVICES so devstack
35# knows what it should be testing.
36ENABLED_SERVICES=""
37MISSING_HOSTS=""
38
39[[ ! -z "$NOVA_HOST" ]] &&
40 ENABLED_SERVICES="n-api,n-crt,n-obj,n-sch" ||
41 MISSING_HOSTS="$MISSING_HOSTS NOVA_HOST"
42[[ ! -z "$GLANCE_HOST" ]] &&
43 ENABLED_SERVICES="${ENABLED_SERVICES},g-api,g-reg" ||
44 MISSING_HOSTS="$MISSING_HOSTS GLANCE_HOST"
45[[ ! -z "$KEYSTONE_HOST" ]] &&
46 ENABLED_SERVICES="${ENABLED_SERVICES},key" ||
47 MISSING_HOSTS="$MISSING_HOSTS KEYSTONE_HOST"
48
49# Optional services.
50[[ ! -z "$NOVA_VOLUME_HOST" ]] && ENABLED_SERVICES="$ENABLED_SERVICES,n-vol"
51[[ ! -z "$CEPH_HOST" ]] && ENABLED_SERVICES="$ENABLED_SERVICES,ceph"
52[[ ! -z "$CINDER_HOST" ]] && ENABLED_SERVICES="$ENABLED_SERVICES,cinder,c-api,c-vol"
53[[ ! -z "$HORIZON_HOST" ]] && ENABLED_SERVICES="$ENABLED_SERVICES,horizon"
54[[ ! -z "$QUANTUM_HOST" ]] && ENABLED_SERVICES="$ENABLED_SERVICES,quantum" ||
55 ENABLED_SERVICES="$ENABLED_SERVICES,n-net"
56[[ ! -z "$SWIFT_HOST" ]] && ENABLED_SERVICES="$ENABLED_SERVICES,swift"
57
58# Bail if we're missing any critical services.
59[[ -n "$MISSING_HOSTS" ]] &&
60 echo "Missing required host in deployment: $MISSING_HOSTS" && exit 1
61
62# These are hard-coded in charm deployment configs, for now.
63# They could potentially be extracted from Juju on the go, via
64# juju-get
65export OS_USERNAME='admin'
66export OS_PASSWORD='Password1+'
67export OS_TENANT_NAME='admin'
68export OS_AUTH_URL="http://$KEYSTONE_HOST:5000/v2.0/"
69export ADMIN_TOKEN='ubuntutesting'
70
71# Determine the tenant id for the configured tenant name.
72export TENANT_ID="$(keystone tenant-list | grep $OS_TENANT_NAME | awk '{ print $2 }')"
73
74# Floating IP settings specific to our lab. These are used in
75# Quantum network config from prepare_cloud.sh
76export QUANTUM_EXT_NET_GW=${QUANTUM_EXT_NET_GW:-172.16.1.1}
77export QUANTUM_EXT_NET_CIDR=${QUANTUM_EXT_NET_CIDR:-172.16.1.0/24}
78export QUANTUM_EXT_NET_NAME=${QUANTUM_EXT_NET_NAME:-ext_net}
79export QUANTUM_FLOAT_RANGE=${QUANTUM_FLOAT_RANGE:-172.16.1.2:172.16.1.254}
80export QUANTUM_FIXED_NET_CIDR=${QUANTUM_FIXED_NET_CIDR:-192.168.20.0/24}
81export QUANTUM_FIXED_NET_NAME=${QUANTUM_FIXED_NET_NAME:-admin_net}
82export QUANTUM_DNS=${QUANTUM_DNS:-172.16.1.1}
83
84# nova-network dhcp settings, used in prepare_cloud.sh
85export NOVA_NET_PRIVATE_NET_CIDR=${NOVA_NET_PRIVATE_NET_CIDR:-192.168.21.0/24}
86export NOVA_NET_FLOATING_POOL_RANGE=${NOVA_NET_FLOATING_POOL_RANGE:-192.168.20.224/27}
87export NOVA_NET_FLOATING_POOL_RANGE_2=${NOVA_NET_FLOATING_POOL_RANGE_2:-192.168.20.223/27}
88
89# Generate some EC2 creds via keystoneclient, if
90# its installed
91if which keystone >/dev/null 2>&1 ; then
92 EC2_URL=$(keystone catalog --service ec2 | awk '/ publicURL / { print $4 }')
93 S3_URL=$(keystone catalog --service s3 | awk '/ publicURL / { print $4 }')
94 CREDS=$(keystone ec2-credentials-create)
95 EC2_ACCESS_KEY=$(echo "$CREDS" | awk '/ access / { print $4 }')
96 EC2_SECRET_KEY=$(echo "$CREDS" | awk '/ secret / { print $4 }')
97else
98 echo "Couldn't find keystone client executable, skipping"\
99 " EC2 credential generation."
100fi
101
102echo "Writing envrc"
103
104cat >envrc <<END
105export NOVA_HOST=$NOVA_HOST
106export GLANCE_HOST=$GLANCE_HOST
107export KEYSTONE_HOST=$KEYSTONE_HOST
108export HORIZON_HOST=$HORIZON_HOST
109export CINDER_HOST=$CINDER_HOST
110export NOVA_VOLUME_HOST=$NOVA_VOLUME_HOST
111export NOVA_COMPUTE_HOST=$NOVA_COMPUTE_HOST
112export SWIFT_HOST=$SWIFT_HOST
113export OS_USERNAME=$OS_USERNAME
114export OS_PASSWORD=$OS_PASSWORD
115export OS_TENANT_NAME=$OS_TENANT_NAME
116export TENANT_ID=$TENANT_ID
117export OS_AUTH_URL=$OS_AUTH_URL
118export OS_REGION_NAME=RegionOne
119export ADMIN_TOKEN=$ADMIN_TOKEN
120export TEMPEST_USER_1=tempest-1
121export TEMPEST_USER_2=tempest-2
122export TEMPEST_USERS_PASSWORD=ubuntu
123export TEMPEST_TENANT_1=tempest-tenant-1
124export TEMPEST_TENANT_2=tempest-tenant-2
125export ENABLED_SERVICES=$ENABLED_SERVICES
126END
127
128if [[ -n "$EC2_URL" ]] ; then
129 cat >>envrc <<END
130export EC2_URL=$EC2_URL
131export S3_URL=$S3_URL
132export EC2_ACCESS_KEY=$EC2_ACCESS_KEY
133export EC2_SECRET_KEY=$EC2_SECRET_KEY
134END
135fi
136
137if [[ -n "$QUANTUM_HOST" ]] ; then
138 cat >>envrc <<END
139export NEUTRON_AVAILABLE=true
140export QUANTUM_AVAILABLE=true
141export QUANTUM_HOST=$QUANTUM_HOST
142export QUANTUM_EXT_NET_GW=$QUANTUM_EXT_NET_GW
143export QUANTUM_EXT_NET_CIDR=$QUANTUM_EXT_NET_CIDR
144export QUANTUM_EXT_NET_NAME=$QUANTUM_EXT_NET_NAME
145export QUANTUM_FLOAT_RANGE=$QUANTUM_FLOAT_RANGE
146export QUANTUM_FIXED_NET_CIDR=$QUANTUM_FIXED_NET_CIDR
147export QUANTUM_FIXED_NET_NAME=$QUANTUM_FIXED_NET_NAME
148export QUANTUM_DNS=$QUANTUM_DNS
149END
150else
151 cat >>envrc <<END
152export NEUTRON_AVAILABLE=false
153export QUANTUM_AVAILABLE=false
154export NOVA_NET_PRIVATE_NET_CIDR=$NOVA_NET_PRIVATE_NET_CIDR
155export NOVA_NET_FLOATING_POOL_RANGE=$NOVA_NET_FLOATING_POOL_RANGE
156export NOVA_NET_FLOATING_POOL_RANGE_2=$NOVA_NET_FLOATING_POOL_RANGE_2
157END
158fi
159
160if [[ -n "$SWIFT_HOST" ]] ; then
161 echo "export SWIFT_AVAILABLE=false" >>envrc
162else
163 echo "export SWIFT_AVAILABLE=false" >>envrc
164fi
165
166if [[ -n "$CEPH_HOST" ]] ; then
167 echo "export VOLUME_BACKEND=ceph" >>envrc
168else
169 echo "export VOLUME_BACKEND=iSCSI" >>envrc
170fi
171
172# TODO: Extend this to support detecting other computes (lxc)
173if [[ -n "$NOVA_COMPUTE_HOST" ]] ; then
174 virt_type=$(python -c "
175import yaml
176import subprocess
177conf = yaml.load(subprocess.check_output(['juju', 'get', 'nova-compute']))
178if 'value' in conf['settings']['virt-type']:
179 print conf['settings']['virt-type']['value']
180else:
181 print 'kvm'
182")
183 [[ -z "$virt_type" ]] && virt_type="kvm"
184 echo "export COMPUTE_BACKEND=$virt_type" >>envrc
185elif [[ -n "$NOVA_VMWARE_HOST" ]] ; then
186 echo "export COMPUTE_BACKEND=vmware" >>envrc
187fi
1880
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare-cloud'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare-cloud 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare-cloud 1970-01-01 00:00:00 +0000
@@ -1,57 +0,0 @@
1#!/bin/bash -xe
2# Utility script to:
3# - Upload an image to glance, cirros by default.
4# Since our Jenkins host is cut off from the outside
5# world, images are hard-coded and expected to exist in
6# following locations locally:
7# $HOME/images/precise-server-cloudimg-amd64.tar.gz
8# $HOME/images/ttylinux-uec-i686-12.1_2.6.35-22_1.tar.gz
9# $HOME/images/cirros-0.3.0-x86_64-uec.tar.gz
10#
11# - Configure networks in Nova's database. Also hard-coded here
12# to configure:
13# - private instance network 10.14.4.24,
14# multi_host, bridge=br100, bridge_interface=eth1
15# - default floating ip pool 192.168.20.224/27
16# - secondary floating ip pool 192.168.20.223/27
17#
18# This script expects:
19# - Environment contains any variables needed by glance's client tools
20# (use inspect_environment.sh to generate envrc containing these)
21# - Passwordless ssh access to nova-cloud-controller, and passwordless
22# sudo access for the ubuntu user (to call nova-manage)
23
24cwd=`dirname $0`
25
26function error_out() {
27 echo "* [ERROR prepare_cloud]: $@" && exit 1
28}
29
30function log() {
31 echo "- [prepare_cloud]: $@"
32}
33
34OS_RELEASE="$1"
35
36# These hosts should have all been set in environment, via envrc
37missing=""
38[[ -z "$NOVA_HOST" ]] && missing="$missing NOVA_HOST"
39[[ -z "$OS_USERNAME" ]] && missing="$missing OS_USERNAME"
40[[ -z "$OS_PASSWORD" ]] && missing="$missing OS_PASSWORD"
41[[ -z "$OS_AUTH_URL" ]] && missing="$missing OS_AUTH_URL"
42[[ -z "$OS_TENANT_NAME" ]] && missing="$missing OS_TENANT_NAME"
43[[ -n "$missing" ]] && error_out "Missing from environment: $missing"
44
45export IMG_DIR=${IMG_DIR:-$HOME/images}
46export DEFAULT_IMAGE=${DEFAULT_IMAGE:-$IMG_DIR/precise-server-cloudimg-amd64-disk1.img}
47export VMWARE_IMAGE=${VMWARE_IMAGE:-$IMG_DIR/vmware/precise.vmdk}
48export LXC_IMAGE=${LXC_IMAGE:-$IMG_DIR/lxc/precise-server-cloudimg-amd64.img
49}
50
51[[ ! -e $cwd/prepare_cloud/$OS_RELEASE ]] &&
52 error_out "Could not load prep library from $cwd/prepare_cloud/$OS_RELEASE"
53
54. $cwd/prepare_cloud/$OS_RELEASE
55
56setup_network
57publish_image ubuntu
580
=== removed directory 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare_cloud'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare_cloud/essex'
=== target was u'folsom'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare_cloud/folsom'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare_cloud/folsom 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare_cloud/folsom 1970-01-01 00:00:00 +0000
@@ -1,147 +0,0 @@
1#!/bin/bash -xe
2# Utility script to:
3# - Upload an image to glance, cirros by default.
4# Since our Jenkins host is cut off from the outside
5# world, images are hard-coded and expected to exist in
6# following locations locally:
7#
8# $HOME/cirros-0.3.0-x86_64-disk.img
9# $HOME/quantal-server-cloudimg-amd64-disk1.img
10#
11# - Configure networks in Nova's database. Also hard-coded here
12# to configure:
13# - private instance network 192.168.21.0/24,
14# multi_host, bridge=br100, bridge_interface=eth1
15# - default floating ip pool 192.168.20.224/27
16# - secondary floating ip pool 192.168.20.223/27
17#
18# This script expects:
19# - Environment contains any variables needed by glance's client tools
20# (use inspect_environment.sh to generate envrc containing these)
21# - Passwordless ssh access to nova-cloud-controller, and passwordless
22# sudo access for the ubuntu user (to call nova-manage)
23
24
25function setup_nova_network() {
26 # Conditionally create nova's instance network and 2 floating ip pools
27 # this takes place on the cloud-controller using nova-manage
28 log "Logging into $NOVA_HOST and creating network via nova-manage"
29 ssh ubuntu@"$NOVA_HOST" "[[ -e ~/network-created ]] || \
30 (sudo nova-manage network create private $NOVA_NET_PRIVATE_NET_CIDR \
31 1 256 --bridge=br100 --bridge_interface=eth1 --multi_host=T \
32 && touch ~/network-created)" ||
33 error_out "Could not create network."
34
35 log "Logging into $NOVA_HOST and creating default floating IP pool"
36 ssh ubuntu@"$NOVA_HOST" "[[ -e ~/floating-pool1-created ]] || \
37 (sudo nova-manage floating create $NOVA_NET_FLOATING_POOL_RANGE \
38 && touch ~/floating-pool1-created)" ||
39 error_out "Could not create default floating pool."
40
41 log "Logging into $NOVA_HOST and creating secondary floating IP pool"
42 ssh ubuntu@"$NOVA_HOST" "[[ -e ~/floating-pool2-created ]] || \
43 (sudo nova-manage floating create --ip_range=$NOVA_NET_FLOATING_POOL_RANGE_2 \
44 --pool=test_range && touch ~/floating-pool2-created)" ||
45 error_out "ERROR: Could not create secondary floatig pool."
46}
47
48function setup_quantum_network() {
49 # SSHes to nova-c-c and uses the charm's quantum utility script with
50 # creds generated by inspect_environment.sh.
51 ssh ubuntu@"$NOVA_HOST" "\
52 OS_USERNAME=$OS_USERNAME OS_PASSWORD=$OS_PASSWORD \
53 OS_TENANT_NAME=$OS_TENANT_NAME OS_AUTH_URL=$OS_AUTH_URL \
54 OS_REGION_NAME=RegionOne \
55 quantum-ext-net -g $QUANTUM_EXT_NET_GW \
56 -c $QUANTUM_EXT_NET_CIDR \
57 -f $QUANTUM_FLOAT_RANGE \
58 -t services \
59 $QUANTUM_EXT_NET_NAME"
60 ssh ubuntu@"$NOVA_HOST" "\
61 OS_USERNAME=$OS_USERNAME OS_PASSWORD=$OS_PASSWORD \
62 OS_TENANT_NAME=$OS_TENANT_NAME OS_AUTH_URL=$OS_AUTH_URL \
63 OS_REGION_NAME=RegionOne \
64 quantum-tenant-net -t admin -r provider-router \
65 $QUANTUM_FIXED_NET_NAME $QUANTUM_FIXED_NET_CIDR"
66
67 # save the IDs of new network to envrc for later testing.
68 ext_net_id=$(neutron net-list | grep "$QUANTUM_EXT_NET_NAME " | \
69 awk '{ print $2 }')
70 fixed_net_id=$(neutron net-list | grep "$QUANTUM_FIXED_NET_NAME " | \
71 awk '{ print $2 }')
72 ext_net_router=$(neutron router-list | grep "$ext_net_id" | \
73 grep provider-router | awk '{ print $2 }')
74 [[ -e envrc ]] &&
75 echo "export QUANTUM_EXT_NET_ID=$ext_net_id" >>envrc &&
76 echo "export QUANTUM_FIXED_NET_ID=$fixed_net_id" >>envrc &&
77 echo "export QUANTUM_EXT_NET_ROUTER_ID=$ext_net_router" >>envrc
78}
79
80function setup_network() {
81 if (echo $ENABLED_SERVICES | grep -q quantum) ||
82 (echo $ENABLED_SERVICES | grep -q neutron) ; then
83 setup_quantum_network
84 else
85 setup_nova_network
86 fi
87}
88
89
90function ubuntu_image() {
91 # certain compute backends require certain image formats
92 case "$COMPUTE_BACKEND" in
93 "vmware") echo $VMWARE_IMAGE ;;
94 "lxc") echo $LXC_IMAGE ;;
95 *) echo $DEFAULT_IMAGE ;;
96 esac
97}
98
99function glance_args() {
100 # certain compute backends require images be published with special
101 # properties
102 # NOTE: assumes vmware images are sparse. needs to be adjusted
103 # publishing preallocated or thin images
104 case "$COMPUTE_BACKEND" in
105 "vmware") echo "--disk-format=vmdk --container-format=bare " \
106 "--is-public=true --property vmware-adaptertype=ide " \
107 "--property vmware-ostype=ubuntuGuest " \
108 "--property vmware_disktype=sparse" ;;
109 "lxc") echo "--container-format=bare --disk-format=raw --property hypervisor_type=lxc" \
110 "--is-public true" ;;
111 *) echo "--is-public=true --container-format=ami --disk-format=ami" ;;
112 esac
113}
114
115function publish_image() {
116 # Publish a cloud img directly into glance using glance client
117 case "$1" in
118 "ubuntu") IMG="$(ubuntu_image)" ;;
119 "cirros"|*) IMG="$IMG_DIR/cirros-0.3.0-x86_64-disk.img" ;;
120 esac
121 [[ ! -e "$IMG" ]] && error_out "Could not find IMG @ $IMG"
122 log "Using IMG @ $IMG."
123
124 # Clear out any existing images.
125 for i in $(glance image-list | grep active | awk '{ print $2 }') ; do
126 log "Deleting existing image from glance with id $i"
127 glance image-delete $i
128 done
129
130 IMG_NAME=$(echo ${IMG##*/} | sed -e 's/\.img//g')
131 args="$(glance_args)"
132 RESP=$(glance image-create --name="$IMG_NAME-ami" $args < $IMG)
133 IMG_UUID=$(echo "$RESP" | grep " id " | awk '{ print $4 }')
134 log "Published AMI for $IMG_NAME with ID $IMG_UUID"
135 log "Cleaning up $IMG_NAME..."
136 rm -rf $IMG_NAME*
137
138 # Find the correpsonding EC2 AMI ID that was assigned the the Glance image.
139 EC2_IMG_UUID=$(euca-describe-images | grep "$IMG_NAME-ami" | awk '{ print $2 }' | head -n1)
140
141 # if this is being run as part of jenkins job, its likely there is an envrc
142 # in the pwd that we care to update with the name of the image we just published.
143 [[ -e envrc ]] && \
144 echo "export IMAGE_NAME=$IMG_NAME-ami" >>envrc && \
145 echo "export IMAGE_UUID=$IMG_UUID" >>envrc
146 echo "export EC2_IMG_UUID=$EC2_IMG_UUID" >>envrc
147}
1480
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare_cloud/grizzly'
=== target was u'folsom'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare_cloud/havana'
=== target was u'grizzly'
=== removed symlink 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/prepare_cloud/icehouse'
=== target was u'havana'
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-configuration/verify-cloud'
--- usr/lib/orange-box/examples/openstack/complex/openstack-configuration/verify-cloud 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-configuration/verify-cloud 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1#!/bin/bash -e
2
3source envrc
4base=$(dirname $0)
5${base}/configure-tests
6nosetests -v
70
=== removed file 'usr/lib/orange-box/examples/openstack/complex/openstack-prereqs-install.sh'
--- usr/lib/orange-box/examples/openstack/complex/openstack-prereqs-install.sh 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/openstack-prereqs-install.sh 1970-01-01 00:00:00 +0000
@@ -1,183 +0,0 @@
1#!/bin/bash
2set -ex
3sudo apt-get install --yes libvirt-bin virtinst qemu-kvm juju iptables-persistent juju-deployer \
4 python-keystoneclient python-novaclient python-cinderclient python-glanceclient python-neutronclient \
5 python-nose git python-swiftclient uuid
6[ -d ~/isos ] || mkdir ~/isos
7[ -f ~/isos/ubuntu-12.04.3-server-amd64.iso ] || wget http://releases.ubuntu.com/precise/ubuntu-12.04.3-server-amd64.iso -O ~/isos/ubuntu-12.04.3-server-amd64.iso
8
9grep 'libvirtd.*ubuntu' /etc/group || (echo "Adding ubuntu user to libvirtd group" && sudo adduser ubuntu libvirtd && echo "Please re-login and run again" && exit 0)
10
11[ -f /home/ubuntu/.ssh/id_rsa ] || echo -e "\n\n\n" | ssh-keygen -N "" -t rsa -f /home/ubuntu/.ssh/id_rsa
12maas-cli admin sshkeys list | grep id || maas-cli admin sshkeys new key="$(cat ~/.ssh/id_rsa.pub)"
13
14# Make Logical Volumes for the guests
15echo "Skipping setup of LVMs"
16# sudo vgscan | grep BigDisk || sudo vgcreate BigDisk /dev/sdb1
17
18# for service in juju lds neutron; do
19# sudo lvdisplay | grep ${service}_disk && sudo lvremove -f BigDisk/${service}_disk
20# done
21# sudo lvcreate -L20G -n juju_disk BigDisk
22# sudo lvcreate -L800G -n lds_disk BigDisk
23# sudo lvcreate -L20G -n neutron_disk BigDisk
24
25sudo tee /etc/init/maas-pserv.override << EOF
26# Don't start maas-pserv until bridge has started
27start on net-device-up IFACE=br1
28EOF
29
30# Setup networking
31# Add to /etc/network/interfaces
32grep br0 /etc/network/interfaces || sudo tee /etc/network/interfaces <<EOF
33# This file describes the network interfaces available on your system
34# and how to activate them. For more information, see interfaces(5).
35
36# The loopback network interface
37auto lo
38iface lo inet loopback
39
40
41# USB NIC; connect to LAN.
42#auto em1
43#iface em1 inet dhcp
44
45#auto eth0
46#iface eth0 inet dhcp
47
48# External connectivity
49auto br0
50iface br0 inet dhcp
51 bridge_ports eth0
52 bridge_stp off
53 bridge_fd 0
54 bridge_maxwait 0
55
56# The interface to the internal network.
57auto br1
58iface br1 inet static
59 address 10.14.4.1
60 netmask 255.255.255.0
61 broadcast 10.14.4.255
62 network 10.14.4.0
63 bridge_ports em1
64 bridge_stp off
65 bridge_fd 0
66 bridge_maxwait 0
67 dns-nameservers 10.14.4.1
68 dns-search orangebox.org
69
70EOF
71
72sudo sed -i -e's/eth0/br0/g' /etc/iptables/rules.v4
73sudo sed -i -e's/em1/br1/g' /etc/iptables/rules.v4
74sudo service iptables-persistent restart
75
76cluster_controller_uuid=$(maas-cli admin node-groups list | grep uuid | cut -d'"' -f4)
77# Replace MAAS management of em1 with br1
78maas-cli admin node-group-interface delete ${cluster_controller_uuid} em1 && maas-cli admin node-group-interfaces new ${cluster_controller_uuid} interface=br1 ip=10.14.4.1 subnet_mask=255.255.255.0 broadcast_ip=10.14.4.255 router_ip=10.14.4.1 ip_range_low=10.14.4.20 ip_range_high=10.14.4.254 management=2 && sudo service maas-dhcp-server restart && sudo service maas-pserv restart && sudo service maas-cluster-celery restart && sudo service maas-region-celery restart
79
80sudo sed -ie 's/#prepend domain-name-servers 127.0.0.1;/prepend domain-name-servers 10.14.4.1;/' /etc/dhcp/dhclient.conf
81virsh net-info default && virsh net-destroy default && virsh net-undefine default
82
83# create bridge on 172.16.1.0/24 for neutron
84virsh net-info bridge2 || ( virsh net-define bridge2.xml && virsh net-autostart bridge2 && virsh net-start bridge2 )
85
86# cat >/tmp/maas-private.xml <<EOF
87# <network>
88# <name>maas-private</name>
89# <uuid>c46a86d4-3111-ddfa-1118-922b78d37600</uuid>
90# <bridge name='virbr1' stp='on' delay='0' />
91# <mac address='52:54:11:26:F2:BC'/>
92# </network>
93# EOF
94
95# cat >/tmp/maas-external.xml <<EOF
96# <network>
97# <name>maas-external</name>
98# <uuid>c46a86d4-3111-ddfa-1118-922b78201208</uuid>
99# <bridge name='virbr2' stp='on' delay='0' />
100# <mac address='52:54:11:26:F2:BD'/>
101# </network>
102# EOF
103# for net in maas-private maas-external; do
104# virsh net-define /tmp/$net.xml
105# virsh net-autostart $net
106# virsh net-start $net
107# done
108sudo ifup br0
109sudo ifup br1
110[ -d /home/maas ] || sudo install -d /home/maas --owner maas --group maas
111sudo chsh maas -s /bin/bash
112[ -d /home/maas/.ssh ] || echo -e "\n\n\n" | sudo -u maas ssh-keygen -N "" -t rsa -f /home/maas/.ssh/id_rsa
113[ -f /home/maas/.ssh/config ] || sudo -u maas tee /home/maas/.ssh/config <<EOF
114Host *
115 UserKnownHostsFile /dev/null
116 StrictHostKeyChecking no
117EOF
118grep 'maas@' ~/.ssh/authorized_keys || sudo cat /home/maas/.ssh/id_rsa.pub | tee -a /home/ubuntu/.ssh/authorized_keys
119# 10.14.4.1 known hosts
120
121# create the kvms, not in loop due to neutron being different
122echo -e "virt-install juju instance"
123virsh list --all --name | grep juju || sudo virt-install --name juju --ram 4096 --disk path=/mnt/juju_disk,size=20 --vcpus=2 --os-type=linux --pxe --network=bridge=br1 --boot network || true
124echo -e "virt-install lds instance"
125virsh list --all --name | grep lds || sudo virt-install --name lds --ram 4096 --disk path=/mnt/lds_disk,size=20 --vcpus=2 --os-type=linux --pxe --network=bridge=br1 --boot network || true
126echo -e "virt-install neutron instance"
127virsh list --all --name | grep neutron || sudo virt-install --name neutron --ram 4096 --disk path=/mnt/neutron_disk,size=20 --vcpus=2 --os-type=linux --pxe --network=bridge=virbr1 --network=bridge=br1 --boot network || true
128
129# loop to fixup the kvms
130for system in juju lds neutron; do
131 mac=$(virsh dumpxml $system | python -c 'import sys, lxml.etree; print list(lxml.etree.parse(sys.stdin).iter("mac"))[0].get("address")')
132 system_id=$(maas-cli admin nodes list mac_address=$mac | grep system_id | cut -d'"' -f4)
133 # until [ $system_id ]; do
134 # system_id=$(maas-cli admin nodes list mac_address=$mac | grep system_id | cut -d'"' -f4)
135 # sleep 10
136 # done
137 maas-cli admin node update $system_id hostname=$system.master power_type=virsh power_parameters_power_address=qemu+ssh://ubuntu@10.14.4.1/system power_parameters_power_id=$system
138 maas-cli admin tags new name=$system || true
139 maas-cli admin tag update-nodes $system add=$system_id
140 maas-cli admin tag update-nodes use-fastpath-installer add=$system_id
141 maas-cli admin node commission $system_id || true
142done
143
144
145for system in juju lds neutron; do
146 mac=$(virsh dumpxml $system | python -c 'import sys, lxml.etree; print list(lxml.etree.parse(sys.stdin).iter("mac"))[0].get("address")')
147 system_id=$(maas-cli admin nodes list mac_address=$mac | grep system_id | cut -d'"' -f4)
148 echo "Waiting for $system to be Ready"
149 until maas-cli admin node read $system_id | grep status | awk {'print $2'} | grep '4,'; do echo -n '.'; sleep 5; done
150done
151
152
153# set all physical nodes to use fast installer
154
155for system in node1 node2 node3 node4 node5 node6 node7 node8 node9; do
156 system_id=$(maas-cli admin nodes list hostname=$system.master | grep system_id | cut -d'"' -f4)
157 maas-cli admin tag update-nodes use-fastpath-installer add=$system_id
158done
159
160#Add Tag NUC to identify physical nodes
161maas-cli admin tag new name='nuc' comment='physical nuc nodes' definition='//node[@id="core"]/product = "D53427RKE"'
162
163# DNS forwarding, /etc/bind/named.conf.options
164
165[ -d ~/.juju ] || mkdir ~/.juju
166
167maas_oauth=$(maas-cli list | awk '{ print $3 }')
168
169cat > ~/.juju/environments.yaml <<EOF
170environments:
171 maas:
172 type: maas
173 admin-secret: Password1+
174
175 # maas-server specifies the location of the MAAS server. It must
176 # specify the base path.
177 maas-server: 'http://10.14.4.1/MAAS/'
178
179 # maas-oauth holds the OAuth credentials from MAAS.
180 maas-oauth: '$maas_oauth'
181EOF
182
183echo "Install script finished"
1840
=== removed file 'usr/lib/orange-box/examples/openstack/complex/remove-kvms.sh'
--- usr/lib/orange-box/examples/openstack/complex/remove-kvms.sh 2014-06-10 23:44:37 +0000
+++ usr/lib/orange-box/examples/openstack/complex/remove-kvms.sh 1970-01-01 00:00:00 +0000
@@ -1,53 +0,0 @@
1#!/bin/bash
2#
3# BE FOREWARNED!
4#
5# THIS SCRIPT
6# TAKES NODES 1-9 BACK TO BASE READY STATE
7# ELIMINATES ALL KVMS FROM NODE 0
8# TAKES MAAS STATE BACK TO BASE LEVELS
9#
10# THIS SCRIPT WILL LEAVE ALONE
11# The LVM setup
12# The networking setup (including DNS/DHCP info)
13# The MAAS basic setup (including maas user/ssh,
14# but not juju environment/bootstrap info)
15#
16
17set -e
18echo -e "Clear juju environment with juju destroy-environment"
19echo -e "This will set nodes 1-9 back to Ready state in MAAS"
20echo -e "and delete the ~/.juju/environments dir."
21juju destroy-environment maas || true
22rm -rf ~/.juju/environments
23
24echo -e "Removing the ssh known_hosts file"
25rm -f ~/.ssh/known_hosts
26
27echo -e " Delete virtual nodes from MAAS state"
28#nodes=$(maas-cli admin tag nodes virtual | grep system_id | sed -e 's/", $//' -e 's/^.*"//')
29#for node in $nodes;do
30# echo "Deleting virtual node: $node from MAAS."
31# maas-cli admin node delete $node
32#done
33for nodename in juju lds neutron; do
34 system_id=$(maas-cli admin nodes list hostname=$nodename.master | grep system_id | cut -d'"' -f4)
35 echo -e "Deleting virtual node: $nodename == $system_id from MAAS."
36 maas-cli admin node delete $system_id || :
37done
38
39echo -e "Deleting KVMs from node 0"
40
41set +e # We want to try all of these
42sudo virsh destroy juju
43sudo virsh destroy lds
44sudo virsh destroy neutron
45sudo virsh undefine juju
46sudo virsh undefine lds
47sudo virsh undefine neutron
48set -e
49
50echo -e "Removing virtual bridge2"
51sudo virsh net-destroy bridge2
52
53echo -e "Done."
540
=== removed file 'usr/lib/orange-box/examples/openstack/havana/99-cleanup.sh'
--- usr/lib/orange-box/examples/openstack/havana/99-cleanup.sh 2014-07-16 07:31:25 +0000
+++ usr/lib/orange-box/examples/openstack/havana/99-cleanup.sh 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1#!/bin/bash
2
3#Destroy everything
4juju destroy-environment maas
5export AMT_PASSWORD=Password1+
6for i in $(seq 11 19); do
7 yes | amttool 10.14.4.$i powerdown >/dev/null 2>&1
8done
90
=== removed file 'usr/lib/orange-box/examples/openstack/icehouse/precise/00-bootstrap.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/precise/00-bootstrap.sh 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/precise/00-bootstrap.sh 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
1#!/bin/bash
2#Canonical Micro-Cluster Demo Preparation
3echo "checking for existing Juju environment..."
4juju status && echo "Existing deployment found, exiting." && exit
5
6rm ~/.ssh/known_hosts
7
8juju env maas
9
10echo "Deploying Juju Bootstrap node to Virtual machine: juju.local using tags=juju"
11juju bootstrap --upload-tools=true --constraints "tags=bootstrap" --show-log --series=precise,trusty
12
13echo "unset constraints"
14juju set-constraints tags=""
15echo "Deploying Juju-gui to bootstrap node"
16juju deploy --to 0 juju-gui
17juju expose juju-gui
18
190
=== modified file 'usr/lib/orange-box/examples/openstack/icehouse/precise/01-deploy.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/precise/01-deploy.sh 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/precise/01-deploy.sh 2014-07-24 01:23:40 +0000
@@ -4,7 +4,7 @@
4set -ex4set -ex
55
6juju set-constraints tags=6juju set-constraints tags=
7juju-deployer -e maas -c icehouseOB.yaml7juju-deployer -c icehouseOB.yaml
88
99
10echo "Deployment finished"10echo "Deployment finished"
1111
=== removed file 'usr/lib/orange-box/examples/openstack/icehouse/precise/02-configure-openstack.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/precise/02-configure-openstack.sh 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/precise/02-configure-openstack.sh 1970-01-01 00:00:00 +0000
@@ -1,72 +0,0 @@
1#!/bin/bash
2
3set -e
4
5echo "This command is run to configure an Orange-Box Openstack deployment"
6
7### assume you ran this : sudo apt-get install python-keystone python-novaclient zile python-neutron python-glanceclient
8unset http_proxy
9unset https_proxy
10
11QUANTUM_EXT_NET_GW="10.14.4.1"
12QUANTUM_EXT_NET_CIDR="10.14.4.0/24"
13QUANTUM_EXT_NET_NAME="ext_net"
14QUANTUM_DNS="10.14.4.1"
15QUANTUM_FLOAT_RANGE_START="10.14.4.20"
16QUANTUM_FLOAT_RANGE_END="10.14.4.49"
17
18QUANTUM_FIXED_NET_CIDR="192.168.14.0/24"
19QUANTUM_FIXED_NET_NAME="admin_net"
20
21keystone=$(juju status keystone | grep public-address | head -1 | awk '{print $2}')
22
23echo "export SERVICE_ENDPOINT=http://$keystone:35357/v2.0/
24export SERVICE_TOKEN=admin
25export OS_AUTH_URL=http://$keystone:35357/v2.0/
26export OS_USERNAME=admin
27export OS_PASSWORD=admin
28export OS_TENANT_NAME=admin
29export OS_REGION_NAME=RegionOne
30" > nova.rc
31
32source nova.rc
33
34# Determine the tenant id for the configured tenant name.
35export TENANT_ID="$(keystone tenant-list | grep $OS_TENANT_NAME | awk '{ print $2 }')"
36
37#create ext network with neutron for floating IPs
38EXTERNAL_NETWORK_ID=$(neutron net-create ext_net --tenant-id $TENANT_ID -- --router:external=True | grep " id" | awk '{print $4}')
39neutron subnet-create ext_net $QUANTUM_EXT_NET_CIDR --name ext_net_subnet --tenant-id $TENANT_ID \
40--allocation-pool start=$QUANTUM_FLOAT_RANGE_START,end=$QUANTUM_FLOAT_RANGE_END \
41--gateway $QUANTUM_EXT_NET_GW --disable-dhcp --dns_nameservers $QUANTUM_DNS list=true
42
43#Create private network for neutron for tenant VMs
44neutron net-create private
45SUBNET_ID=$(neutron subnet-create private $QUANTUM_FIXED_NET_CIDR -- --name private_subnet --dns_nameservers list=true $QUANTUM_DNS | grep " id" | awk '{print $4}')
46
47#Create router for external network and private network
48ROUTER_ID=$(neutron router-create --tenant-id $TENANT_ID provider-router | grep " id" | awk '{print $4}')
49neutron router-interface-add $ROUTER_ID $SUBNET_ID
50neutron router-gateway-set $ROUTER_ID $EXTERNAL_NETWORK_ID
51
52#Configure the default security group to allow ICMP and SSH
53nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
54nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
55#for rdp
56nova secgroup-add-rule default tcp 3389 3389 0.0.0.0/0
57
58#Upload a default SSH key
59nova keypair-add --pub-key ~/.ssh/id_rsa.pub default
60
61#Remove the m1.tiny as it is too small for Ubuntu.
62nova flavor-delete m1.tiny
63
64#Upload images to glance
65glance add name="Precise x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/precise-server-cloudimg-amd64-disk1.img
66glance add name="Trusty x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img
67glance add name="CentOS 6.4" is_public=true container_format=bare disk_format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img
68glance add name="Cirros 0.3" is_public=true container_format=bare disk_format=qcow2 < /srv/data/cirros-0.3.2-x86_64-disk.img
69glance add name="Windows Server 2012" is_public=true container_format=bare disk_format=qcow2 < /srv/data/windows_server_2012_r2_standard_eval_kvm_20131117.qcow2
70
71exit
72
730
=== removed file 'usr/lib/orange-box/examples/openstack/icehouse/precise/04-deploy-jumpserver-and-juju.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/precise/04-deploy-jumpserver-and-juju.sh 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/precise/04-deploy-jumpserver-and-juju.sh 1970-01-01 00:00:00 +0000
@@ -1,72 +0,0 @@
1#!/bin/bash
2
3set -ex
4
5echo "This command is run to launch the first instance on a new Orange box Openstack deployment"
6
7source nova.rc
8
9#Modify quotas for the tenant to allow large deployments
10TENANT=$(keystone tenant-list | grep $OS_TENANT_NAME | awk '{print $2}')
11nova quota-update --instances 50 $TENANT
12nova quota-update --cores 50 $TENANT
13nova quota-update --ram 102400 $TENANT
14nova quota-update --security-groups 50 $TENANT
15
16#Create a floating IP for the instance
17FLOAT_IP="$(nova floating-ip-create | grep ext_net | awk '{ print $2}')"
18
19#Launch an instance
20NET_UUID="$(nova net-list | grep private | awk '{ print $2 }')"
21IMAGE_UUID="$(nova image-list | grep Trusty | awk '{ print $2 }')"
22nova boot --flavor 2 --key_name default --image $IMAGE_UUID --nic net-id=$NET_UUID --security_group default jumpserver
23sleep 40
24
25#Associate the floating IP with the new instance
26nova floating-ip-associate jumpserver $FLOAT_IP
27sleep 10
28#SSH into the instance and install Juju
29ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP sudo apt-get -y install juju-core juju-quickstart juju-deployer
30
31#Set up the Juju default environment
32ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP juju init
33
34#Output a juju env file that works on this cloud
35ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "echo 'default: openstack
36environments:
37 openstack:
38 type: openstack
39 network: private
40 auth-url: $OS_AUTH_URL
41 tenant-name: $OS_TENANT_NAME
42 region: $OS_REGION_NAME
43 auth-mode: userpass
44 username: $OS_USERNAME
45 password: $OS_PASSWORD
46 admin-secret: $OS_PASSWORD
47 default-series: precise
48' > ~/.juju/environments.yaml"
49
50#Create juju metadata
51ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "juju-metadata generate-image -a amd64 -u $OS_AUTH_URL -i $IMAGE_UUID -r $OS_REGION_NAME -s trusty"
52
53IMAGE_UUID="$(nova image-list | grep Precise | awk '{ print $2 }')"
54ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "juju-metadata generate-image -a amd64 -u $OS_AUTH_URL -i $IMAGE_UUID -r $OS_REGION_NAME -s precise"
55
56#Bootstrap Juju
57ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "juju bootstrap --metadata-source=/home/ubuntu --upload-tools=true --series=precise,trusty"
58
59#Deploy juju-gui
60ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "juju deploy --to 0 juju-gui && juju expose juju-gui"
61
62#Create a new floating IP and associate with juju bootstrap instance
63INSTANCE_ID="$(nova list | grep juju-openstack-machine-0 | awk '{ print $2}')"
64FLOAT_IP2="$(nova floating-ip-create | grep ext_net | awk '{ print $2}')"
65nova floating-ip-associate $INSTANCE_ID $FLOAT_IP2
66
67#Print the address of Juju-gui for deployments on Openstack
68echo "Now connect to the Juju-GUI at: http://$FLOAT_IP2/ to continue deployments on Openstack."
69echo "Pass: $OS_PASSWORD"
70
71exit
72
730
=== removed file 'usr/lib/orange-box/examples/openstack/icehouse/precise/99-cleanup.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/precise/99-cleanup.sh 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/precise/99-cleanup.sh 1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
1#!/bin/bash
2
3#Destroy everything
4juju destroy-environment maas-trusty
5echo "wait a bit for maas to do his job"
6sleep 45
7export AMT_PASSWORD=Password1+
8for i in $(seq 11 19); do
9 yes | amttool 10.14.4.$i powerdown >/dev/null 2>&1
10done
11
120
=== modified file 'usr/lib/orange-box/examples/openstack/icehouse/precise/README'
--- usr/lib/orange-box/examples/openstack/icehouse/precise/README 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/precise/README 2014-07-24 01:23:40 +0000
@@ -1,10 +1,20 @@
1This demo will deploy Icehouse on 14.041This demo will deploy Icehouse on 12.04
2By the end of the demo you will have a working Openstack,2By the end of the demo you will have a working Openstack,
3plus a working Openstack Juju environment and GUI to deploy further workloads to.3plus a working Openstack Juju environment and GUI to deploy further workloads to.
4Just run each script in order:4
500-bootstrap.sh - This will boostrap Juju on the MAAS provider5
601-deploy.sh - This will deploy Openstack on the Orange Box.6./01-deploy.sh - This will deploy Openstack on the Orange Box.
702-configure-openstack.sh - This will configure openstack ready to launch instances7orange-box-configure-openstack - This will configure openstack ready to launch instances
803-deploy-jumpserver-and-juju.sh - This will deploy a Jumpserver with a public IP for SSH access into the tenant private network, install Juju and create an Openstack Juju environment, bootstrap and launch the GUI and print the public IP of the GUI.8
999-cleanup.sh - This will destroy the Juju environment on the MAAS provider and make sure all NUC nodes are shut down.9orange-box-launch-openstack-juju - This will deploy a Jumpserver with a public IP for SSH access into the tenant private network, install Juju and create an Openstack Juju environment, bootstrap and launch the GUI and print the public IP of the GUI.
10
11OPTIONAL:
12./deploy-instances.sh - This will deploy a number of instances to show the cloud working.
13
14
15automated deployment
16For testing purposes or an unattended deployment, you can use the script:
17./automated-deployment.sh
18which will run the deployment scripts from bootstrap to deploying the jumpserver and juju-gui.
19This takes about 30 minutes.
1020
1121
=== added file 'usr/lib/orange-box/examples/openstack/icehouse/precise/automated-deploy.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/precise/automated-deploy.sh 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/precise/automated-deploy.sh 2014-07-24 01:23:40 +0000
@@ -0,0 +1,26 @@
1#!/bin/bash
2#Canonical Micro-Cluster auto-deployment bootstrap to tenant juju-gui
3set -e #-x for debugging output
4
5start=`date`
6orange-box-bootstrap-juju
7until (juju pprint | grep juju-gui | grep started) ; do
8 sleep 10
9 done
10./01-deploy.sh
11sleep 60
12orange-box-configure-openstack
13sleep 60
14source ~/nova.rc
15until (glance image-list | grep Precise | grep active) ; do
16 sleep 10
17 done
18until (glance image-list | grep Trusty | grep active) ; do
19 sleep 10
20 done
21orange-box-launch-openstack-juju
22end=`date`
23
24echo "Deployment started: $start"
25echo "Deployment completed: $end"
26
027
=== added file 'usr/lib/orange-box/examples/openstack/icehouse/precise/deploy-instances.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/precise/deploy-instances.sh 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/precise/deploy-instances.sh 2014-07-24 01:23:40 +0000
@@ -0,0 +1,40 @@
1#!/bin/bash
2
3#This script expects you to already have a nova.rc file in this directory.
4#your nova.rc can be created manually or downlaoded from horizon dashboard.
5#it should look like this:
6#export SERVICE_ENDPOINT=http://HOST:35357/v2.0/
7#export SERVICE_TOKEN=admin
8#export OS_AUTH_URL=http://HOST:35357/v2.0/
9#export OS_USERNAME=admin
10#export OS_PASSWORD=admin
11#export OS_TENANT_NAME=admin
12#export OS_REGION_NAME=RegionOne
13#Where HOST is your keystone host or IP address.
14
15set -e
16
17echo "This command is run to deploy any number of instance on a new Orange box Openstack deployment"
18
19source nova.rc
20
21#How many instances to start
22echo "How many machines should be deployed? (Default is 0, 0-48)"
23read -n 2 instances
24if [ "$instances" = "0" ] ; then
25 echo "You selected 0 instances to deploy, exiting!"
26 exit
27fi
28
29#Launch an instance
30NET_UUID="$(nova net-list | grep private | awk '{ print $2 }')"
31IMAGE_UUID="$(nova image-list | grep Trusty | awk '{ print $2 }')"
32for (( c=1; c<=$instances; c++ ))
33do
34 echo "Deploying test instance: $c"
35 nova boot --flavor 2 --key_name default --image $IMAGE_UUID --nic net-id=$NET_UUID --security_group default test-instance-$c
36done
37
38exit
39
40
041
=== modified file 'usr/lib/orange-box/examples/openstack/icehouse/precise/icehouseOB.yaml'
--- usr/lib/orange-box/examples/openstack/icehouse/precise/icehouseOB.yaml 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/precise/icehouseOB.yaml 2014-07-24 01:23:40 +0000
@@ -4,7 +4,7 @@
4 source: "cloud:precise-updates/icehouse"4 source: "cloud:precise-updates/icehouse"
5 services:5 services:
6 ceph:6 ceph:
7 charm: "cs:precise/ceph"7 charm: "cs:precise/ceph-26"
8 num_units: 38 num_units: 3
9 constraints: tags=physical9 constraints: tags=physical
10 options:10 options:
@@ -12,107 +12,134 @@
12 "monitor-secret": AQAAvoJSOAv/NRAAgvXP8d7iXN7lWYbvDZzm2Q==12 "monitor-secret": AQAAvoJSOAv/NRAAgvXP8d7iXN7lWYbvDZzm2Q==
13 "osd-devices": "/srv"13 "osd-devices": "/srv"
14 "osd-reformat": "yes"14 "osd-reformat": "yes"
15 "ceph-radosgw": 15 annotations:
16 charm: "cs:precise/ceph-radosgw"16 "gui-x": "2648.6688842773438"
17 num_units: 117 "gui-y": "708.3873901367188"
18 constraints: tags=physical
19 keystone: 18 keystone:
20 charm: "cs:precise/keystone"19 charm: "cs:precise/keystone-37"
21 num_units: 120 num_units: 1
22 constraints: tags=physical21 constraints: tags=physical
23 options: 22 options:
24 "admin-password": "admin"23 "admin-password": "admin"
25 "admin-token": "admin"24 "admin-token": "admin"
26 annotations:25 annotations:
27 "gui-x": "1731.1756591796875"26 "gui-x": "2013.905517578125"
28 "gui-y": "59.8729248046875"27 "gui-y": "75.58013916015625"
29 "nova-compute":28 "nova-compute":
30 charm: "cs:precise/nova-compute"29 charm: "cs:precise/nova-compute-31"
31 num_units: 330 num_units: 3
32 to: [ceph=0, ceph=1, ceph=2]31 to: [ceph=0, ceph=1, ceph=2]
33 options:32 options:
34 "flat-interface": eth033 "flat-interface": eth0
35 annotations:34 annotations:
36 "gui-x": "1325.8563232421875"35 "gui-x": "776.1040649414062"
37 "gui-y": "-27.374825477600098"36 "gui-y": "-81.22811031341553"
38 "neutron-gateway":37 "neutron-gateway":
39 charm: "cs:precise/quantum-gateway"38 charm: "cs:precise/quantum-gateway-21"
40 num_units: 139 num_units: 1
41 constraints: tags=neutron40 constraints: tags=neutron
42 options:41 options:
43 ext-port: eth142 ext-port: eth1
44 instance-mtu: 140043 instance-mtu: 1400
45 annotations:44 annotations:
46 "gui-x": "847.3951416015625"45 "gui-x": "329.0572509765625"
47 "gui-y": "432.41436767578125"46 "gui-y": "46.4658203125"
48 "nova-cloud-controller": 47 "nova-cloud-controller":
49 charm: "cs:precise/nova-cloud-controller"48 charm: "cs:precise/nova-cloud-controller-41"
50 num_units: 149 num_units: 1
51 constraints: tags=physical50 constraints: tags=physical
52 options: 51 options:
53 "network-manager": Neutron52 "network-manager": Neutron
54 annotations:53 annotations:
55 "gui-x": "1401.865234375"54 "gui-x": "1388.40185546875"
56 "gui-y": "891.737548828125"55 "gui-y": "-118.01156234741211"
57 rabbitmq: 56 rabbitmq:
58 charm: "cs:precise/rabbitmq-server"57 charm: "cs:precise/rabbitmq-server-28"
59 num_units: 158 num_units: 1
60 to: 059 to: mysql
61 annotations:60 annotations:
62 "gui-x": "2000.339111328125"61 "gui-x": "633.8120727539062"
63 "gui-y": "420.60723876953125"62 "gui-y": "862.6530151367188"
64 glance: 63 glance:
65 charm: "cs:precise/glance"64 charm: "cs:precise/glance-34"
66 num_units: 165 num_units: 1
67 to: nova-cloud-controller66 to: nova-cloud-controller
68 annotations:67 annotations:
69 "gui-x": "1008.2059936523438"68 "gui-x": "1147.3269653320312"
70 "gui-y": "734.3492889404297"69 "gui-y": "1389.5643157958984"
71 cinder: 70 cinder:
72 charm: "cs:precise/cinder"71 charm: "cs:precise/cinder-26"
73 num_units: 172 num_units: 1
74 to: nova-cloud-controller73 to: nova-cloud-controller
75 options: 74 options:
76 "block-device": none75 "block-device": none
77 annotations:76 annotations:
78 "gui-x": "980.4285888671875"77 "gui-x": "1752.32568359375"
79 "gui-y": "154.0172348022461"78 "gui-y": "1365.716194152832"
80 "ceph-radosgw":79 "ceph-radosgw":
81 charm: "cs:precise/ceph-radosgw"80 charm: "cs:precise/ceph-radosgw-12"
82 num_units: 181 num_units: 1
83 to: nova-cloud-controller82 to: nova-cloud-controller
83 annotations:
84 "gui-x": "2216.68212890625"
85 "gui-y": "697.16796875"
84 cinder-ceph:86 cinder-ceph:
85 charm: "cs:precise/cinder-ceph"87 charm: "cs:precise/cinder-ceph-1"
88 num_units: 0
89 annotations:
90 "gui-x": "2257.5515747070312"
91 "gui-y": "1231.2130126953125"
86 "openstack-dashboard": 92 "openstack-dashboard":
87 charm: "cs:precise/openstack-dashboard"93 charm: "cs:precise/openstack-dashboard-20"
88 num_units: 194 num_units: 1
89 to: "keystone"95 to: "keystone"
96 options:
97 webroot: "/"
90 annotations:98 annotations:
91 "gui-x": "2023.8385009765625"99 "gui-x": "2353.6898193359375"
92 "gui-y": "65.05170631408691"100 "gui-y": "-94.2642593383789"
93 mysql: 101 mysql:
94 charm: "cs:precise/mysql"102 charm: "cs:precise/mysql-46"
95 num_units: 1103 num_units: 1
96 to: 0104 constraints: tags=physical
97 options:105 options:
98 "dataset-size": "20%"106 "dataset-size": "20%"
99 annotations:107 annotations:
100 "gui-x": "1912.73876953125"108 "gui-x": "364.4567565917969"
101 "gui-y": "762.34814453125"109 "gui-y": "1067.5167846679688"
102 mongodb:110 mongodb:
103 charm: "cs:precise/mongodb"111 charm: "cs:precise/mongodb-29"
104 num_units: 1112 num_units: 1
105 constraints: tags=physical113 constraints: tags=physical
114 annotations:
115 "gui-x": "-70.0399979352951"
116 "gui-y": "1282.8224487304688"
106 ceilometer:117 ceilometer:
107 charm: "cs:precise/ceilometer"118 charm: "cs:precise/ceilometer-20"
108 num_units: 1119 num_units: 1
109 to: mongodb120 to: mongodb
121 annotations:
122 "gui-x": "-78.13333225250244"
123 "gui-y": "919.3128051757812"
110 ceilometer-agent:124 ceilometer-agent:
111 charm: "cs:precise/ceilometer-agent"125 charm: "cs:precise/ceilometer-agent-18"
126 num_units: 0
127 annotations:
128 "gui-x": "-90.9158582687378"
129 "gui-y": "562.5347595214844"
112 heat:130 heat:
113 charm: "cs:precise/heat"131 charm: "cs:precise/heat-3"
114 num_units: 1132 num_units: 1
115 to: mongodb133 to: mongodb
134 annotations:
135 "gui-x": "494.94012451171875"
136 "gui-y": "1363.6024169921875"
137 ntp:
138 charm: "cs:precise/ntp-3"
139 num_units: 0
140 annotations:
141 "gui-x": "-104.57728099822998"
142 "gui-y": "294.6641273498535"
116 relations: 143 relations:
117 - - "keystone:shared-db"144 - - "keystone:shared-db"
118 - "mysql:shared-db"145 - "mysql:shared-db"
@@ -180,5 +207,33 @@
180 - "ceph:radosgw"207 - "ceph:radosgw"
181 - - "ceph-radosgw:identity-service"208 - - "ceph-radosgw:identity-service"
182 - "keystone:identity-service"209 - "keystone:identity-service"
210 - - "ntp:juju-info"
211 - "neutron-gateway:juju-info"
212 - - "ntp:juju-info"
213 - "ceph:juju-info"
214 - - "ntp:juju-info"
215 - "keystone:juju-info"
216 - - "ntp:juju-info"
217 - "nova-compute:juju-info"
218 - - "ntp:juju-info"
219 - "nova-cloud-controller:juju-info"
220 - - "ntp:juju-info"
221 - "rabbitmq:juju-info"
222 - - "ntp:juju-info"
223 - "glance:juju-info"
224 - - "ntp:juju-info"
225 - "cinder:juju-info"
226 - - "ntp:juju-info"
227 - "ceph-radosgw:juju-info"
228 - - "ntp:juju-info"
229 - "openstack-dashboard:juju-info"
230 - - "ntp:juju-info"
231 - "mysql:juju-info"
232 - - "ntp:juju-info"
233 - "mongodb:juju-info"
234 - - "ntp:juju-info"
235 - "ceilometer:juju-info"
236 - - "ntp:juju-info"
237 - "heat:juju-info"
183 series: precise238 series: precise
184239
185240
=== removed file 'usr/lib/orange-box/examples/openstack/icehouse/trusty/00-bootstrap.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/trusty/00-bootstrap.sh 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/trusty/00-bootstrap.sh 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
1#!/bin/bash
2#Canonical Micro-Cluster Demo Preparation
3echo "checking for existing Juju environment..."
4juju status && echo "Existing deployment found, exiting." && exit
5
6rm ~/.ssh/known_hosts
7
8juju env maas-trusty
9
10echo "Deploying Juju Bootstrap node to Virtual machine: juju.local using tags=juju"
11juju bootstrap --upload-tools=true --constraints "tags=bootstrap" --show-log --series=precise,trusty
12
13echo "unset constraints"
14juju set-constraints tags=""
15echo "Deploying Juju-gui to bootstrap node"
16juju deploy --to 0 juju-gui
17juju expose juju-gui
18
190
=== modified file 'usr/lib/orange-box/examples/openstack/icehouse/trusty/01-deploy.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/trusty/01-deploy.sh 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/trusty/01-deploy.sh 2014-07-24 01:23:40 +0000
@@ -4,7 +4,7 @@
4set -ex4set -ex
55
6juju set-constraints tags=6juju set-constraints tags=
7juju-deployer -e maas-trusty -c icehouseOB.yaml7juju-deployer -c icehouseOB.yaml
88
99
10echo "Deployment finished"10echo "Deployment finished"
1111
=== removed file 'usr/lib/orange-box/examples/openstack/icehouse/trusty/02-configure-openstack.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/trusty/02-configure-openstack.sh 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/trusty/02-configure-openstack.sh 1970-01-01 00:00:00 +0000
@@ -1,72 +0,0 @@
1#!/bin/bash
2
3set -e
4
5echo "This command is run to configure an Orange-Box Openstack deployment"
6
7### assume you ran this : sudo apt-get install python-keystone python-novaclient zile python-neutron python-glanceclient
8unset http_proxy
9unset https_proxy
10
11QUANTUM_EXT_NET_GW="10.14.4.1"
12QUANTUM_EXT_NET_CIDR="10.14.4.0/24"
13QUANTUM_EXT_NET_NAME="ext_net"
14QUANTUM_DNS="10.14.4.1"
15QUANTUM_FLOAT_RANGE_START="10.14.4.20"
16QUANTUM_FLOAT_RANGE_END="10.14.4.49"
17
18QUANTUM_FIXED_NET_CIDR="192.168.14.0/24"
19QUANTUM_FIXED_NET_NAME="admin_net"
20
21keystone=$(juju status keystone | grep public-address | head -1 | awk '{print $2}')
22
23echo "export SERVICE_ENDPOINT=http://$keystone:35357/v2.0/
24export SERVICE_TOKEN=admin
25export OS_AUTH_URL=http://$keystone:35357/v2.0/
26export OS_USERNAME=admin
27export OS_PASSWORD=admin
28export OS_TENANT_NAME=admin
29export OS_REGION_NAME=RegionOne
30" > nova.rc
31
32source nova.rc
33
34# Determine the tenant id for the configured tenant name.
35export TENANT_ID="$(keystone tenant-list | grep $OS_TENANT_NAME | awk '{ print $2 }')"
36
37#create ext network with neutron for floating IPs
38EXTERNAL_NETWORK_ID=$(neutron net-create ext_net --tenant-id $TENANT_ID -- --router:external=True | grep " id" | awk '{print $4}')
39neutron subnet-create ext_net $QUANTUM_EXT_NET_CIDR --name ext_net_subnet --tenant-id $TENANT_ID \
40--allocation-pool start=$QUANTUM_FLOAT_RANGE_START,end=$QUANTUM_FLOAT_RANGE_END \
41--gateway $QUANTUM_EXT_NET_GW --disable-dhcp --dns_nameservers $QUANTUM_DNS list=true
42
43#Create private network for neutron for tenant VMs
44neutron net-create private
45SUBNET_ID=$(neutron subnet-create private $QUANTUM_FIXED_NET_CIDR -- --name private_subnet --dns_nameservers list=true $QUANTUM_DNS | grep " id" | awk '{print $4}')
46
47#Create router for external network and private network
48ROUTER_ID=$(neutron router-create --tenant-id $TENANT_ID provider-router | grep " id" | awk '{print $4}')
49neutron router-interface-add $ROUTER_ID $SUBNET_ID
50neutron router-gateway-set $ROUTER_ID $EXTERNAL_NETWORK_ID
51
52#Configure the default security group to allow ICMP and SSH
53nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
54nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
55#for rdp
56nova secgroup-add-rule default tcp 3389 3389 0.0.0.0/0
57
58#Upload a default SSH key
59nova keypair-add --pub-key ~/.ssh/id_rsa.pub default
60
61#Remove the m1.tiny as it is too small for Ubuntu.
62nova flavor-delete m1.tiny
63
64#Upload images to glance
65glance add name="Precise x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/precise-server-cloudimg-amd64-disk1.img
66glance add name="Trusty x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img
67glance add name="CentOS 6.4" is_public=true container_format=bare disk_format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img
68glance add name="Cirros 0.3" is_public=true container_format=bare disk_format=qcow2 < /srv/data/cirros-0.3.2-x86_64-disk.img
69glance add name="Windows Server 2012" is_public=true container_format=bare disk_format=qcow2 < /srv/data/windows_server_2012_r2_standard_eval_kvm_20131117.qcow2
70
71exit
72
730
=== removed file 'usr/lib/orange-box/examples/openstack/icehouse/trusty/04-deploy-jumpserver-and-juju.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/trusty/04-deploy-jumpserver-and-juju.sh 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/trusty/04-deploy-jumpserver-and-juju.sh 1970-01-01 00:00:00 +0000
@@ -1,77 +0,0 @@
1#!/bin/bash
2
3set -ex
4
5echo "This command is run to launch the first instance on a new Orange box Openstack deployment"
6
7source nova.rc
8
9#Modify quotas for the tenant to allow large deployments
10TENANT=$(keystone tenant-list | grep $OS_TENANT_NAME | awk '{print $2}')
11nova quota-update --instances 50 $TENANT
12nova quota-update --cores 50 $TENANT
13nova quota-update --ram 102400 $TENANT
14nova quota-update --security-groups 50 $TENANT
15
16#Create a floating IP for the instance
17FLOAT_IP="$(nova floating-ip-create | grep ext_net | awk '{ print $2}')"
18
19#Launch an instance
20NET_UUID="$(nova net-list | grep private | awk '{ print $2 }')"
21IMAGE_UUID="$(nova image-list | grep Trusty | awk '{ print $2 }')"
22nova boot --flavor 2 --key_name default --image $IMAGE_UUID --nic net-id=$NET_UUID --security_group default jumpserver
23sleep 40
24
25#Associate the floating IP with the new instance
26nova floating-ip-associate jumpserver $FLOAT_IP
27sleep 10
28#SSH into the instance and install Juju
29ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP sudo apt-get -y install juju-core juju-quickstart juju-deployer
30
31#Set up the Juju default environment
32ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP juju init
33
34#Output a juju env file that works on this cloud
35ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "echo 'default: openstack
36environments:
37 openstack:
38 type: openstack
39 network: private
40 auth-url: $OS_AUTH_URL
41 tenant-name: $OS_TENANT_NAME
42 region: $OS_REGION_NAME
43 auth-mode: userpass
44 username: $OS_USERNAME
45 password: $OS_PASSWORD
46 admin-secret: $OS_PASSWORD
47 default-series: trusty
48' > ~/.juju/environments.yaml"
49
50#Create juju metadata
51ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "juju-metadata generate-image -a amd64 -u $OS_AUTH_URL -i $IMAGE_UUID -r $OS_REGION_NAME -s trusty"
52
53IMAGE_UUID="$(nova image-list | grep Precise | awk '{ print $2 }')"
54ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "juju-metadata generate-image -a amd64 -u $OS_AUTH_URL -i $IMAGE_UUID -r $OS_REGION_NAME -s precise"
55
56#Bootstrap Juju
57ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "juju bootstrap --metadata-source=/home/ubuntu --upload-tools=true --series=precise,trusty"
58
59#Deploy juju-gui
60ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "juju deploy --to 0 juju-gui && juju expose juju-gui"
61
62#Install the Orange-box-examples package
63ssh -o StrictHostKeyChecking=no ubuntu@$FLOAT_IP "sudo apt-add-repository ppa:orange-box-examples/ppa && sudo apt-get update && sudo apt-get install -y orange-box-examples"
64
65#Create a new floating IP and associate with juju bootstrap instance
66INSTANCE_ID="$(nova list | grep juju-openstack-machine-0 | awk '{ print $2}')"
67FLOAT_IP2="$(nova floating-ip-create | grep ext_net | awk '{ print $2}')"
68nova floating-ip-associate $INSTANCE_ID $FLOAT_IP2
69
70#Print the address of Juju-gui for deployments on Openstack
71echo "Now connect to the Juju-GUI at: http://$FLOAT_IP2/ to continue deployments on Openstack."
72echo "Pass: $OS_PASSWORD"
73
74echo "OR Log in to openstack Jumpserver to deploy from command line"
75echo "ssh ubuntu@$FLOAT_IP"
76exit
77
780
=== removed file 'usr/lib/orange-box/examples/openstack/icehouse/trusty/99-cleanup.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/trusty/99-cleanup.sh 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/trusty/99-cleanup.sh 1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
1#!/bin/bash
2
3#Destroy everything
4juju destroy-environment maas-trusty
5echo "wait a bit for maas to do his job"
6sleep 45
7export AMT_PASSWORD=Password1+
8for i in $(seq 11 19); do
9 yes | amttool 10.14.4.$i powerdown >/dev/null 2>&1
10done
11
120
=== modified file 'usr/lib/orange-box/examples/openstack/icehouse/trusty/README'
--- usr/lib/orange-box/examples/openstack/icehouse/trusty/README 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/trusty/README 2014-07-24 01:23:40 +0000
@@ -1,10 +1,20 @@
1This demo will deploy Icehouse on 14.041This demo will deploy Icehouse on 14.04
2By the end of the demo you will have a working Openstack,2By the end of the demo you will have a working Openstack,
3plus a working Openstack Juju environment and GUI to deploy further workloads to.3plus a working Openstack Juju environment and GUI to deploy further workloads to.
4
4Just run each script in order:5Just run each script in order:
500-bootstrap.sh - This will boostrap Juju on the MAAS provider6./01-deploy.sh - This will deploy Openstack on the Orange Box.
601-deploy.sh - This will deploy Openstack on the Orange Box.7orange-box-configure-openstack - This will configure openstack ready to launch instances
702-configure-openstack.sh - This will configure openstack ready to launch instances8
803-deploy-jumpserver-and-juju.sh - This will deploy a Jumpserver with a public IP for SSH access into the tenant private network, install Juju and create an Openstack Juju environment, bootstrap and launch the GUI and print the public IP of the GUI.9orange-box-launch-openstack-juju - This will deploy a Jumpserver with a public IP for SSH access into the tenant private network, install Juju and create an Openstack Juju environment, bootstrap and launch the GUI and print the public IP of the GUI.
999-cleanup.sh - This will destroy the Juju environment on the MAAS provider and make sure all NUC nodes are shut down.10
11OPTIONAL:
12./deploy-instances.sh - This will deploy a number of instances to show the cloud working.
13
14
15automated deployment
16For testing purposes or an unattended deployment, you can use the script:
17./automated-deployment.sh
18which will run the deployment scripts from bootstrap to deploying the jumpserver and juju-gui.
19This takes about 30 minutes.
1020
1121
=== added file 'usr/lib/orange-box/examples/openstack/icehouse/trusty/automated-deploy.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/trusty/automated-deploy.sh 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/trusty/automated-deploy.sh 2014-07-24 01:23:40 +0000
@@ -0,0 +1,26 @@
1#!/bin/bash
2#Canonical Micro-Cluster auto-deployment bootstrap to tenant juju-gui
3set -e #-x for debugging output
4
5start=`date`
6orange-box-bootstrap-juju trusty
7until (juju pprint | grep juju-gui | grep started) ; do
8 sleep 10
9 done
10./01-deploy.sh
11sleep 60
12orange-box-configure-openstack
13sleep 60
14source ~/nova.rc
15until (glance image-list | grep Precise | grep active) ; do
16 sleep 10
17 done
18until (glance image-list | grep Trusty | grep active) ; do
19 sleep 10
20 done
21orange-box-launch-openstack-juju
22end=`date`
23
24echo "Deployment started: $start"
25echo "Deployment completed: $end"
26
027
=== added file 'usr/lib/orange-box/examples/openstack/icehouse/trusty/deploy-instances.sh'
--- usr/lib/orange-box/examples/openstack/icehouse/trusty/deploy-instances.sh 1970-01-01 00:00:00 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/trusty/deploy-instances.sh 2014-07-24 01:23:40 +0000
@@ -0,0 +1,40 @@
1#!/bin/bash
2
3#This script expects you to already have a nova.rc file in this directory.
4#your nova.rc can be created manually or downlaoded from horizon dashboard.
5#it should look like this:
6#export SERVICE_ENDPOINT=http://HOST:35357/v2.0/
7#export SERVICE_TOKEN=admin
8#export OS_AUTH_URL=http://HOST:35357/v2.0/
9#export OS_USERNAME=admin
10#export OS_PASSWORD=admin
11#export OS_TENANT_NAME=admin
12#export OS_REGION_NAME=RegionOne
13#Where HOST is your keystone host or IP address.
14
15set -e
16
17echo "This command is run to deploy any number of instance on a new Orange box Openstack deployment"
18
19source nova.rc
20
21#How many instances to start
22echo "How many machines should be deployed?"
23read -n 2 instances
24if [ "$instances" = "0" ] ; then
25 echo "You selected 0 instances to deploy, exiting!"
26 exit
27fi
28
29#Launch an instance
30NET_UUID="$(nova net-list | grep private | awk '{ print $2 }')"
31IMAGE_UUID="$(nova image-list | grep Trusty | awk '{ print $2 }')"
32for (( c=1; c<=$instances; c++ ))
33do
34 echo "Deploying test instance: $c"
35 nova boot --flavor 2 --key_name default --image $IMAGE_UUID --nic net-id=$NET_UUID --security_group default test-instance-$c
36done
37
38exit
39
40
041
=== modified file 'usr/lib/orange-box/examples/openstack/icehouse/trusty/icehouseOB.yaml'
--- usr/lib/orange-box/examples/openstack/icehouse/trusty/icehouseOB.yaml 2014-07-14 07:26:29 +0000
+++ usr/lib/orange-box/examples/openstack/icehouse/trusty/icehouseOB.yaml 2014-07-24 01:23:40 +0000
@@ -1,10 +1,10 @@
1icehouse:1icehouse:
2 overrides:2 overrides:
3 openstack-origin: distro3 openstack-origin: "cloud:trusty-icehouse"
4 source: distro4 source: "distro"
5 services:5 services:
6 ceph:6 ceph:
7 charm: "cs:trusty/ceph"7 charm: "cs:trusty/ceph-27"
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches