Deployment
|
⇤ ← Revision 1 as of 2012-11-26 12:32:12
Size: 3667
Comment: initial commit
|
Size: 3661
Comment: fix deployment branch and deploy command
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 49: | Line 49: |
| bzr branch lp:~ev/+junk/whoopsie-daisy-deployment ~/bzr/whoopsie-daisy-deployment | bzr branch lp:error-tracker-deployment ~/bzr/error-tracker-deployment |
| Line 52: | Line 52: |
| JUJU_ENV=canonistackone ~/bzr/whoopsie-daisy-deployment | JUJU_ENV=canonistackone ~/bzr/error-tracker-deployment/deploy |
This document will help you create instances of http://daisy.ubuntu.com and http://errors.ubuntu.com deployed in the cloud.
First you'll need to create an environment for Juju to bootstrap to. Follow the directions here to get a basic environment going. I'd suggest doing something akin to the following to bootstrap the initial node:
source ~/.canonistack/novarc export AWS_SECRET_ACCESS_KEY=$EC2_SECRET_KEY export AWS_ACCESS_KEY_ID=$EC2_ACCESS_KEY juju bootstrap -e canonistackone --constraints "instance-type=m1.medium"
This will ensure that the juju bootstrap node doesn't take ages to perform basic tasks because it's constantly going into swap.
You should end up with something similar to the following in your ~/.juju/environments.yaml:
environments:
canonistacktwo:
type: openstack_s3
default-instance-type: m1.medium
control-bucket: juju-replace-me-with-your-bucket
admin-secret: <secret>
auth-url: https://keystone.canonistack.canonical.com:443/v2.0/
access-key: <access key>
secret-key: <secret key>
default-series: precise
juju-origin: ppa
ssl-hostname-verification: True
default-image-id: bb636e4f-79d7-4d6b-b13b-c7d53419fd5a
canonistackone:
type: ec2
control-bucket: juju-replace-me-with-your-bucket
admin-secret: <secret>
ec2-uri: http://91.189.93.65:8773/services/Cloud
s3-uri: http://91.189.93.65:3333
default-image-id: ami-00000097
access-key: <access key>
secret-key: <secret key>
default-series: precise
ssl-hostname-verification: false
origin: ppa
authorized-keys-path: ~/.ssh/authorized_keysNow you're ready to deploy the individual charms that make up daisy.ubuntu.com and errors.ubuntu.com:
mkdir -p ~/bzr/precise bzr branch lp:~ev/charms/precise/daisy/trunk ~/bzr/precise/daisy bzr branch lp:~ev/charms/precise/daisy-retracer/trunk ~/bzr/precise/daisy-retracer bzr branch lp:~ev/charms/precise/errors/trunk ~/bzr/precise/errors bzr branch lp:error-tracker-deployment ~/bzr/error-tracker-deployment source ~/.canonistack/novarc JUJU_ENV=canonistackone ~/bzr/error-tracker-deployment/deploy
Follow along with JUJU_ENV=canonistackone juju status.
Once all the nodes and relations are out of the pending state, you should be able to start throwing crashes at it. You'll probably want to use tmux or some other terminal multiplexer for this.
Shell #1:
DAISY_ADDRESS="$(juju status daisy/0 | grep public-address | sed 's,.*public-address: \(.*\)$,\1,')" ssh -N -L 8080:$DAISY_ADDRESS:80 $DAISY_ADDRESS
Shell #2:
ERRORS_ADDRESS="$(juju status errors/0 | grep public-address | sed 's,.*public-address: \(.*\)$,\1,')" ssh -N -L 8081:$ERRORS_ADDRESS:80 $ERRORS_ADDRESS
Shell #3:
sudo stop whoopsie bzr branch lp:whoopsie ~/bzr/whoopsie cd ~/bzr/whoopsie make sudo LD_LIBRARY_PATH=src CRASH_DB_URL=http://localhost:8080 ./src/whoopsie -f
Shell #4:
JUJU_ENV=canonistackone juju ssh daisy/0 tail -f /var/log/apache2/error.log -f /var/log/apache2/access.log
Shell #5:
JUJU_ENV=canonistackone juju ssh daisy/0 watch ls /srv/local-oopses-whoopsie
Shell #6:
JUJU_ENV=canonistackone juju ssh daisy-retracer/0 tail -f /var/log/retracer.log
Shell #7:
gedit &; PID="$\!"; sleep 3; kill -SEGV $PID # Elect to submit the error report when the apport dialog appears.
Now open a browser to http://localhost:8081. You should have one problem in the most common problems table.
ErrorTracker/Deployment (last edited 2014-05-26 11:54:50 by brian-murray)