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
1=== modified file 'hadoop/get-hadoop-info.sh'
2--- hadoop/get-hadoop-info.sh 2014-08-07 15:14:28 +0000
3+++ hadoop/get-hadoop-info.sh 2014-10-16 15:43:45 +0000
4@@ -1,4 +1,4 @@
5 #!/bin/bash
6 HADOOP_GUI=`juju status hadoop-master | grep public-address | awk '{ print $2 }' | xargs host | grep address | awk '{ print $4 }'`
7-echo "hadoop-master gui: http://$HADOOP_GUI:50030"
8+echo "hadoop-master gui: http://$HADOOP_GUI:50070"
9
10
11=== modified file 'landscape/README'
12--- landscape/README 2014-08-07 15:14:28 +0000
13+++ landscape/README 2014-10-16 15:43:45 +0000
14@@ -14,6 +14,12 @@
15 You will need to create a file: "repo-file" in this directory with the URL of the Landscape repository.
16 You will need to create a file: "license-file" in this directory with a valid license or trial license to use Landscape.
17
18+Instruction explanations:
19+https://docs.google.com/a/canonical.com/document/d/1LF1xbsdVrCIVIzPyFXaJlnKc0wkANR7q1fkq3SNcyss
20+
21+Verify the pastebin in it for october 2014 it is:
22+https://pastebin.canonical.com/117457/
23+
24 Overview:
25
26 First an initial Juju environment will be used to deploy Landscape itself onto the OB.
27
28=== added file 'openstack/get-cloud-images'
29--- openstack/get-cloud-images 1970-01-01 00:00:00 +0000
30+++ openstack/get-cloud-images 2014-10-16 15:43:45 +0000
31@@ -0,0 +1,23 @@
32+#!/bin/bash -e
33+
34+
35+
36+folder=/srv/data
37+URLS="http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img \
38+http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img \
39+http://mirror.catn.com/pub/catn/images/qcow2/centos6.4-x86_64-gold-master.img \
40+http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img "
41+
42+for URL in $URLS
43+do
44+FILENAME=${URL##*/}
45+if [ -f $folder/$FILENAME ];
46+then
47+ echo "$FILENAME already downloaded."
48+else
49+ wget -q -O $folder/$FILENAME $URL
50+fi
51+done
52+
53+
54+echo "To download Windows image get there : http://www.cloudbase.it/cloud-init-for-windows-instances/"
55
56=== modified file 'openstack/multi-region/icehouse/trusty/02-configure-multi-region.sh'
57--- openstack/multi-region/icehouse/trusty/02-configure-multi-region.sh 2014-08-23 19:20:45 +0000
58+++ openstack/multi-region/icehouse/trusty/02-configure-multi-region.sh 2014-10-16 15:43:45 +0000
59@@ -17,7 +17,8 @@
60 # You should have received a copy of the GNU General Public License
61 # along with this program. If not, see <http://www.gnu.org/licenses/>.
62
63-set -e
64+set -ex
65+
66
67 echo "This command is run to configure an Orange-Box Multi Region Openstack deployment"
68
69@@ -128,7 +129,7 @@
70 glance add name="Trusty x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img
71 glance add name="CentOS 6.4" is_public=true container_format=bare disk_format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img
72 glance add name="Cirros 0.3" is_public=true container_format=bare disk_format=qcow2 < /srv/data/cirros-0.3.2-x86_64-disk.img
73-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 &
74+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 &
75
76 done
77
78
79=== modified file 'openstack/multi-region/icehouse/trusty/multi-region-icehouse-OB.yaml'
80--- openstack/multi-region/icehouse/trusty/multi-region-icehouse-OB.yaml 2014-08-23 19:20:45 +0000
81+++ openstack/multi-region/icehouse/trusty/multi-region-icehouse-OB.yaml 2014-10-16 15:43:45 +0000
82@@ -97,6 +97,7 @@
83 to: neutron-gateway-r1=0
84 options:
85 "block-device": none
86+ "config-flags": "storage_availability_zone=storage-r1"
87 region: RegionOne
88 annotations:
89 "gui-x": "1904.6063232421875"
90@@ -191,6 +192,7 @@
91 options:
92 region: RegionTwo
93 "block-device": none
94+ "config-flags": "storage_availability_zone=storage-r2"
95 annotations:
96 "gui-x": "4448.0172119140625"
97 "gui-y": "1436.996467590332"
98
99=== modified file 'openstack/orange-box-configure-openstack'
100--- openstack/orange-box-configure-openstack 2014-09-22 13:12:33 +0000
101+++ openstack/orange-box-configure-openstack 2014-10-16 15:43:45 +0000
102@@ -21,7 +21,8 @@
103
104 echo "This command is run to configure an Orange-Box Openstack deployment"
105
106-sudo apt-get install -y python-keystone python-neutronclient python-novaclient python-glanceclient
107+PKGS=" python-keystone python-neutronclient python-novaclient python-glanceclient"
108+dpkg -l $PKGS > /dev/null || sudo apt-get install -y $PKGS
109
110 NEUTRON_EXT_NET_GW="10.14.4.1"
111 NEUTRON_EXT_NET_CIDR="10.14.0.0/16"
112@@ -84,9 +85,9 @@
113
114 #Upload images to glance
115 glance add name="Precise x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/precise-server-cloudimg-amd64-disk1.img
116-#glance add name="Trusty x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img
117-#glance add name="CentOS 6.4" is_public=true container_format=bare disk_format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img
118-#glance add name="Cirros 0.3" is_public=true container_format=bare disk_format=qcow2 < /srv/data/cirros-0.3.2-x86_64-disk.img
119-#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 &
120+glance add name="Trusty x86_64" is_public=true container_format=ovf disk_format=qcow2 < /srv/data/trusty-server-cloudimg-amd64-disk1.img
121+glance add name="CentOS 6.4" is_public=true container_format=bare disk_format=qcow2 < /srv/data/centos6.4-x86_64-gold-master.img
122+glance add name="Cirros 0.3" is_public=true container_format=bare disk_format=qcow2 < /srv/data/cirros-0.3.2-x86_64-disk.img
123+##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 &
124
125 exit
126
127=== modified file 'openstack/orange-box-launch-openstack-juju'
128--- openstack/orange-box-launch-openstack-juju 2014-09-23 13:09:43 +0000
129+++ openstack/orange-box-launch-openstack-juju 2014-10-16 15:43:45 +0000
130@@ -28,7 +28,7 @@
131 #Launch an instance
132 NET_UUID="$(nova net-list | grep private | awk '{ print $2 }')"
133 IMAGE_UUID="$(nova image-list | grep Trusty | awk '{ print $2 }')"
134-nova boot --flavor 2 --key_name default --image $IMAGE_UUID --nic net-id=$NET_UUID --security_group default jumpserver
135+nova boot --flavor 3 --key_name default --image $IMAGE_UUID --nic net-id=$NET_UUID --security_group default jumpserver
136 sleep 40
137
138 #Associate the floating IP with the new instance
139@@ -48,6 +48,7 @@
140 environments:
141 openstack:
142 type: openstack
143+ use-floating-ip: true
144 network: private
145 auth-url: $OS_AUTH_URL
146 tenant-name: $OS_TENANT_NAME
147@@ -81,10 +82,12 @@
148 #Install the Orange-box-examples package
149 ssh -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"
150
151+## useless if juju floating ip option on.
152+#########################################
153 #Create a new floating IP and associate with juju bootstrap instance
154-INSTANCE_ID="$(nova list | grep juju-openstack-machine-0 | awk '{ print $2}')"
155-FLOAT_IP2="$(nova floating-ip-create | grep ext_net | awk '{ print $2}')"
156-nova floating-ip-associate $INSTANCE_ID $FLOAT_IP2
157+#INSTANCE_ID="$(nova list | grep juju-openstack-machine-0 | awk '{ print $2}')"
158+#FLOAT_IP2="$(nova floating-ip-create | grep ext_net | awk '{ print $2}')"
159+#nova floating-ip-associate $INSTANCE_ID $FLOAT_IP2
160
161 #Print the address of Juju-gui for deployments on Openstack
162 echo "Now connect to the Juju-GUI at: http://$FLOAT_IP2/ to continue deployments on Openstack."
163
164=== added directory 'zabbix'
165=== added file 'zabbix/README'
166--- zabbix/README 1970-01-01 00:00:00 +0000
167+++ zabbix/README 2014-10-16 15:43:45 +0000
168@@ -0,0 +1,19 @@
169+# Creating a Zabbix.
170+
171+You do need a machine external to Juju to show the true integration.
172+
173+You must open the following port 80 (interface), 10050 et 10051 (zabbix)
174+
175+Create a security group if on AWS or OpenStack to ensure you can connect to and be sure you can access that machine/vm.
176+
177+Then simply do:
178+./install-on-machine 54.164.161.172
179+
180+Use your IP of course.
181+
182+If blocked with a "Cleaning" msg .. kill and restart (it should be idempotent)
183+
184+Then http://54.164.161.172/zabbix/
185+login admin / ubuntu
186+
187+# connect your JUJU env and agents.
188
189=== added file 'zabbix/install-on-machine'
190--- zabbix/install-on-machine 1970-01-01 00:00:00 +0000
191+++ zabbix/install-on-machine 2014-10-16 15:43:45 +0000
192@@ -0,0 +1,50 @@
193+#!/bin/bash
194+#
195+# zabbix install on vm
196+# Copyright (C) 2014 Canonical Ltd.
197+#
198+# Authors: nicolas.thomas@canonical.com
199+#
200+# This program is free software: you can redistribute it and/or modify
201+# it under the terms of the GNU General Public License as published by
202+# the Free Software Foundation, version 3 of the License.
203+#
204+# This program is distributed in the hope that it will be useful,
205+# but WITHOUT ANY WARRANTY; without even the implied warranty of
206+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
207+# GNU General Public License for more details.
208+#
209+# You should have received a copy of the GNU General Public License
210+
211+set -e
212+
213+VM_IP=$1
214+
215+if [[ -z "$VM_IP" ]]
216+then
217+ echo "must give name/ip of the system to install on"
218+ exit 2
219+fi
220+ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP sudo apt-get update
221+
222+#SSH into the instance and install git
223+ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP sudo apt-get -y install git
224+
225+#Get Zabbix code from SamNCo
226+ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP "[[ -d zabbix/ ]] || git clone https://github.com/SaMnCo/ob-zabbix.git zabbix"
227+
228+ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP "cd zabbix ; chmod +x install-zabbix-server.sh; sudo ./install-zabbix-server.sh"
229+
230+ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP "sudo service zabbix-server stop"
231+ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP "mysql -uroot -pubuntu zabbix < zabbix/zabbix_full.sql"
232+ssh -o StrictHostKeyChecking=no ubuntu@$VM_IP "sudo service zabbix-server start"
233+
234+
235+#copy over SSH keys
236+scp -o StrictHostKeyChecking=no ~/.ssh/id_rsa* ubuntu@$VM_IP:
237+
238+echo "Got to http://$VM_IP/zabbix "
239+echo "login admin / ubuntu"
240+exit
241+
242+#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