~gz/pyjuju/debug_openstack_placement

« back to all changes in this revision

Viewing changes to juju/machine/tests/data/test_get_container

  • Committer: Clint Byrum
  • Date: 2012-10-06 14:38:12 UTC
  • mfrom: (486.4.39 local-cloud-img)
  • Revision ID: clint@fewbar.com-20121006143812-id2qq4i2ui75yy8h
Refactor local provider to use Cloud Images [r=hazmat][f=915520,930430,996358,997677,1037803,1038927]

- Boots a full container with cloud-init each time, No more template container + clone
- Removes upstart job for storage server. Also fixes machine-agent to be killable on destroy-env
- Uses LXC's default networking rather than libvirt. Removes dependency on libvirt entirely.
- Regresses HTTPS apt support for local provider because cloud-init doesn't have a way to make the
distinction.
- Regresses performance for the case where the download is cached. rsync'ing from the debootstrap
is a little faster than extracting the tar.gz. Also we now do a full apt-get upgrade, so all updates
have to be unpacked/configured.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#cloud-config
 
2
apt_sources:
 
3
- {source: 'ppa:juju/pkgs'}
 
4
apt_update: true
 
5
apt_upgrade: true
 
6
apt_proxy: 'http://localhost:3142'
 
7
machine-data: {juju-provider-type: null, juju-zookeeper-hosts: 'localhost:2181',
 
8
  machine-id: null}
 
9
output: {all: '| tee -a /var/log/cloud-init-output.log'}
 
10
packages: [bzr, byobu, tmux, python-setuptools, python-twisted, python-txaws, python-zookeeper]
 
11
runcmd: [sudo apt-get install -y python-txzookeeper, sudo mkdir -p /usr/lib/juju,
 
12
  'cd /usr/lib/juju && sudo /usr/bin/bzr co --lightweight lp:juju 
 
13
    juju', cd /usr/lib/juju/juju && sudo python setup.py develop, sudo mkdir -p /var/lib/juju,
 
14
  sudo mkdir -p /var/log/juju, 'cat >> /etc/init/juju-riak-0.conf <<EOF
 
15
 
 
16
    description "Juju unit agent for riak/0"
 
17
 
 
18
    author "Juju Team <juju@lists.ubuntu.com>"
 
19
 
 
20
 
 
21
    start on runlevel [2345]
 
22
 
 
23
    stop on runlevel [!2345]
 
24
 
 
25
    respawn
 
26
 
 
27
 
 
28
    env JUJU_HOME="/var/lib/juju"
 
29
 
 
30
    env JUJU_MACHINE_ID="None"
 
31
 
 
32
    env JUJU_UNIT_NAME="riak/0"
 
33
 
 
34
    env JUJU_ZOOKEEPER="localhost:2181"
 
35
 
 
36
 
 
37
    exec /usr/bin/python -m juju.agents.unit --nodaemon --logfile /var/log/juju/unit-riak-0.log
 
38
    --session-file /var/run/juju/unit-riak-0-agent.zksession >> /var/log/juju/unit-riak-0-output.log
 
39
    2>&1
 
40
 
 
41
    EOF
 
42
 
 
43
', /sbin/start juju-riak-0]
 
44
ssh_authorized_keys: ['']