Merge lp:~thomnico/orange-box-examples/openstack-getimages into lp:orange-box-examples

Proposed by Nicolas Thomas
Status: Merged
Approved by: Darryl Weaver
Approved revision: 42
Merged at revision: 41
Proposed branch: lp:~thomnico/orange-box-examples/openstack-getimages
Merge into: lp:orange-box-examples
Diff against target: 242 lines (+117/-12)
9 files modified
hadoop/get-hadoop-info.sh (+1/-1)
landscape/README (+6/-0)
openstack/get-cloud-images (+23/-0)
openstack/multi-region/icehouse/trusty/02-configure-multi-region.sh (+3/-2)
openstack/multi-region/icehouse/trusty/multi-region-icehouse-OB.yaml (+2/-0)
openstack/orange-box-configure-openstack (+6/-5)
openstack/orange-box-launch-openstack-juju (+7/-4)
zabbix/README (+19/-0)
zabbix/install-on-machine (+50/-0)
To merge this branch: bzr merge lp:~thomnico/orange-box-examples/openstack-getimages
Reviewer Review Type Date Requested Status
Darryl Weaver Pending
Review via email: mp+238585@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hadoop/get-hadoop-info.sh'
--- hadoop/get-hadoop-info.sh 2014-08-07 15:14:28 +0000
+++ hadoop/get-hadoop-info.sh 2014-10-16 15:43:45 +0000
@@ -1,4 +1,4 @@
1#!/bin/bash1#!/bin/bash
2HADOOP_GUI=`juju status hadoop-master | grep public-address | awk '{ print $2 }' | xargs host | grep address | awk '{ print $4 }'`2HADOOP_GUI=`juju status hadoop-master | grep public-address | awk '{ print $2 }' | xargs host | grep address | awk '{ print $4 }'`
3echo "hadoop-master gui: http://$HADOOP_GUI:50030"3echo "hadoop-master gui: http://$HADOOP_GUI:50070"
44
55
=== modified file 'landscape/README'
--- landscape/README 2014-08-07 15:14:28 +0000
+++ landscape/README 2014-10-16 15:43:45 +0000
@@ -14,6 +14,12 @@
14You will need to create a file: "repo-file" in this directory with the URL of the Landscape repository.14You will need to create a file: "repo-file" in this directory with the URL of the Landscape repository.
15You will need to create a file: "license-file" in this directory with a valid license or trial license to use Landscape.15You will need to create a file: "license-file" in this directory with a valid license or trial license to use Landscape.
1616
17Instruction explanations:
18https://docs.google.com/a/canonical.com/document/d/1LF1xbsdVrCIVIzPyFXaJlnKc0wkANR7q1fkq3SNcyss
19
20Verify the pastebin in it for october 2014 it is:
21https://pastebin.canonical.com/117457/
22
17Overview:23Overview:
1824
19First an initial Juju environment will be used to deploy Landscape itself onto the OB.25First an initial Juju environment will be used to deploy Landscape itself onto the OB.
2026
=== added file 'openstack/get-cloud-images'
--- openstack/get-cloud-images 1970-01-01 00:00:00 +0000
+++ openstack/get-cloud-images 2014-10-16 15:43:45 +0000
@@ -0,0 +1,23 @@
1#!/bin/bash -e
2
3
4
5folder=/srv/data
6URLS="http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img \
7http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img \
8http://mirror.catn.com/pub/catn/images/qcow2/centos6.4-x86_64-gold-master.img \
9http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img "
10
11for URL in $URLS
12do
13FILENAME=${URL##*/}
14if [ -f $folder/$FILENAME ];
15then
16 echo "$FILENAME already downloaded."
17else
18 wget -q -O $folder/$FILENAME $URL
19fi
20done
21
22
23echo "To download Windows image get there : http://www.cloudbase.it/cloud-init-for-windows-instances/"
024
=== modified file 'openstack/multi-region/icehouse/trusty/02-configure-multi-region.sh'
--- openstack/multi-region/icehouse/trusty/02-configure-multi-region.sh 2014-08-23 19:20:45 +0000
+++ openstack/multi-region/icehouse/trusty/02-configure-multi-region.sh 2014-10-16 15:43:45 +0000
@@ -17,7 +17,8 @@
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.18# along with this program. If not, see <http://www.gnu.org/licenses/>.
1919
20set -e20set -ex
21
2122
22echo "This command is run to configure an Orange-Box Multi Region Openstack deployment"23echo "This command is run to configure an Orange-Box Multi Region Openstack deployment"
2324
@@ -128,7 +129,7 @@
128glance add name="Trusty x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img129glance add name="Trusty x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img
129glance add name="CentOS 6.4" is_public=true container_format=bare disk_format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img130glance add name="CentOS 6.4" is_public=true container_format=bare disk_format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img
130glance add name="Cirros 0.3" is_public=true container_format=bare disk_format=qcow2 < /srv/data/cirros-0.3.2-x86_64-disk.img131glance add name="Cirros 0.3" is_public=true container_format=bare disk_format=qcow2 < /srv/data/cirros-0.3.2-x86_64-disk.img
131glance 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 &132glance add name="Windows Server 2012" is_public=true container_format=bare disk_format=qcow2 < /srv/data/windows_server_2012_r2_standard_eval_kvm_20140607.qcow2 &
132133
133done134done
134135
135136
=== modified file 'openstack/multi-region/icehouse/trusty/multi-region-icehouse-OB.yaml'
--- openstack/multi-region/icehouse/trusty/multi-region-icehouse-OB.yaml 2014-08-23 19:20:45 +0000
+++ openstack/multi-region/icehouse/trusty/multi-region-icehouse-OB.yaml 2014-10-16 15:43:45 +0000
@@ -97,6 +97,7 @@
97 to: neutron-gateway-r1=097 to: neutron-gateway-r1=0
98 options: 98 options:
99 "block-device": none99 "block-device": none
100 "config-flags": "storage_availability_zone=storage-r1"
100 region: RegionOne101 region: RegionOne
101 annotations:102 annotations:
102 "gui-x": "1904.6063232421875"103 "gui-x": "1904.6063232421875"
@@ -191,6 +192,7 @@
191 options:192 options:
192 region: RegionTwo193 region: RegionTwo
193 "block-device": none194 "block-device": none
195 "config-flags": "storage_availability_zone=storage-r2"
194 annotations:196 annotations:
195 "gui-x": "4448.0172119140625"197 "gui-x": "4448.0172119140625"
196 "gui-y": "1436.996467590332"198 "gui-y": "1436.996467590332"
197199
=== modified file 'openstack/orange-box-configure-openstack'
--- openstack/orange-box-configure-openstack 2014-09-22 13:12:33 +0000
+++ openstack/orange-box-configure-openstack 2014-10-16 15:43:45 +0000
@@ -21,7 +21,8 @@
2121
22echo "This command is run to configure an Orange-Box Openstack deployment"22echo "This command is run to configure an Orange-Box Openstack deployment"
2323
24sudo apt-get install -y python-keystone python-neutronclient python-novaclient python-glanceclient24PKGS=" python-keystone python-neutronclient python-novaclient python-glanceclient"
25dpkg -l $PKGS > /dev/null || sudo apt-get install -y $PKGS
2526
26NEUTRON_EXT_NET_GW="10.14.4.1"27NEUTRON_EXT_NET_GW="10.14.4.1"
27NEUTRON_EXT_NET_CIDR="10.14.0.0/16"28NEUTRON_EXT_NET_CIDR="10.14.0.0/16"
@@ -84,9 +85,9 @@
8485
85#Upload images to glance86#Upload images to glance
86glance add name="Precise x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/precise-server-cloudimg-amd64-disk1.img 87glance add name="Precise x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/precise-server-cloudimg-amd64-disk1.img
87#glance add name="Trusty x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img88glance add name="Trusty x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img
88#glance add name="CentOS 6.4" is_public=true container_format=bare disk_format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img89glance add name="CentOS 6.4" is_public=true container_format=bare disk_format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img
89#glance add name="Cirros 0.3" is_public=true container_format=bare disk_format=qcow2 < /srv/data/cirros-0.3.2-x86_64-disk.img90glance add name="Cirros 0.3" is_public=true container_format=bare disk_format=qcow2 < /srv/data/cirros-0.3.2-x86_64-disk.img
90#glance 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 &91##glance add name="Windows Server 2012" is_public=true container_format=bare disk_format=qcow2 < /srv/data/windows_server_2012_r2_standard_eval_kvm_20140607.qcow2 &
9192
92exit93exit
9394
=== modified file 'openstack/orange-box-launch-openstack-juju'
--- openstack/orange-box-launch-openstack-juju 2014-09-23 13:09:43 +0000
+++ openstack/orange-box-launch-openstack-juju 2014-10-16 15:43:45 +0000
@@ -28,7 +28,7 @@
28#Launch an instance28#Launch an instance
29NET_UUID="$(nova net-list | grep private | awk '{ print $2 }')"29NET_UUID="$(nova net-list | grep private | awk '{ print $2 }')"
30IMAGE_UUID="$(nova image-list | grep Trusty | awk '{ print $2 }')"30IMAGE_UUID="$(nova image-list | grep Trusty | awk '{ print $2 }')"
31nova boot --flavor 2 --key_name default --image $IMAGE_UUID --nic net-id=$NET_UUID --security_group default jumpserver31nova boot --flavor 3 --key_name default --image $IMAGE_UUID --nic net-id=$NET_UUID --security_group default jumpserver
32sleep 4032sleep 40
3333
34#Associate the floating IP with the new instance34#Associate the floating IP with the new instance
@@ -48,6 +48,7 @@
48environments:48environments:
49 openstack:49 openstack:
50 type: openstack50 type: openstack
51 use-floating-ip: true
51 network: private52 network: private
52 auth-url: $OS_AUTH_URL53 auth-url: $OS_AUTH_URL
53 tenant-name: $OS_TENANT_NAME54 tenant-name: $OS_TENANT_NAME
@@ -81,10 +82,12 @@
81#Install the Orange-box-examples package82#Install the Orange-box-examples package
82ssh -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"83ssh -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"
8384
85## useless if juju floating ip option on.
86#########################################
84#Create a new floating IP and associate with juju bootstrap instance87#Create a new floating IP and associate with juju bootstrap instance
85INSTANCE_ID="$(nova list | grep juju-openstack-machine-0 | awk '{ print $2}')"88#INSTANCE_ID="$(nova list | grep juju-openstack-machine-0 | awk '{ print $2}')"
86FLOAT_IP2="$(nova floating-ip-create | grep ext_net | awk '{ print $2}')"89#FLOAT_IP2="$(nova floating-ip-create | grep ext_net | awk '{ print $2}')"
87nova floating-ip-associate $INSTANCE_ID $FLOAT_IP290#nova floating-ip-associate $INSTANCE_ID $FLOAT_IP2
8891
89#Print the address of Juju-gui for deployments on Openstack92#Print the address of Juju-gui for deployments on Openstack
90echo "Now connect to the Juju-GUI at: http://$FLOAT_IP2/ to continue deployments on Openstack."93echo "Now connect to the Juju-GUI at: http://$FLOAT_IP2/ to continue deployments on Openstack."
9194
=== added directory 'zabbix'
=== added file 'zabbix/README'
--- zabbix/README 1970-01-01 00:00:00 +0000
+++ zabbix/README 2014-10-16 15:43:45 +0000
@@ -0,0 +1,19 @@
1# Creating a Zabbix.
2
3You do need a machine external to Juju to show the true integration.
4
5You must open the following port 80 (interface), 10050 et 10051 (zabbix)
6
7Create a security group if on AWS or OpenStack to ensure you can connect to and be sure you can access that machine/vm.
8
9Then simply do:
10./install-on-machine 54.164.161.172
11
12Use your IP of course.
13
14If blocked with a "Cleaning" msg .. kill and restart (it should be idempotent)
15
16Then http://54.164.161.172/zabbix/
17login admin / ubuntu
18
19# connect your JUJU env and agents.
020
=== added file 'zabbix/install-on-machine'
--- zabbix/install-on-machine 1970-01-01 00:00:00 +0000
+++ zabbix/install-on-machine 2014-10-16 15:43:45 +0000
@@ -0,0 +1,50 @@
1#!/bin/bash
2#
3# zabbix install on vm
4# Copyright (C) 2014 Canonical Ltd.
5#
6# Authors: nicolas.thomas@canonical.com
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, version 3 of the License.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18
19set -e
20
21VM_IP=$1
22
23if [[ -z "$VM_IP" ]]
24then
25 echo "must give name/ip of the system to install on"
26 exit 2
27fi
28ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP sudo apt-get update
29
30#SSH into the instance and install git
31ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP sudo apt-get -y install git
32
33#Get Zabbix code from SamNCo
34ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP "[[ -d zabbix/ ]] || git clone https://github.com/SaMnCo/ob-zabbix.git zabbix"
35
36ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP "cd zabbix ; chmod +x install-zabbix-server.sh; sudo ./install-zabbix-server.sh"
37
38ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP "sudo service zabbix-server stop"
39ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP "mysql -uroot -pubuntu zabbix < zabbix/zabbix_full.sql"
40ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP "sudo service zabbix-server start"
41
42
43#copy over SSH keys
44scp -o StrictHostKeyChecking=no ~/.ssh/id_rsa* ubuntu@$VM_IP:
45
46echo "Got to http://$VM_IP/zabbix "
47echo "login admin / ubuntu"
48exit
49
50#See here:https://kashyapc.fedorapeople.org/virt/snapshots-notes/snapshots-with-virsh-for-qcow2.txt for snapshot

Subscribers

People subscribed via source and target branches