From ce9faf8073185a8cc8c99bd92b04ad1c378abbd7 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Thu, 13 Feb 2014 07:57:57 -0500 Subject: [PATCH] Initial Commit --- Overcloud.md | 16 +++ README.md | 100 ++++++++++++++++++ .../environment.d/.00-source-repo-refs.swp | Bin 0 -> 12288 bytes .../environment.d/00-source-repo-refs | 47 ++++++++ .../extra-data.d/00-cleanup | 15 +++ .../post-install.d/50-tripleo-incubator-path | 13 +++ .../post-install.d/90-restart-xinetd | 8 ++ .../pre-install.d/00-icehouse-repo | 5 + .../pre-install.d/00-setenforce-0 | 5 + .../pre-install.d/01-iptables | 12 +++ .../undercloud-install/pre-install.d/01-pbr | 5 + .../undercloud-install/pre-install.d/01-pip | 5 + .../pre-install.d/03-remove-mariadb-log | 10 ++ .../undercloud-install/pre-install.d/04-sshd | 7 ++ .../undercloud-install/pre-install.d/skel | 5 + json-files/.fedora-20-undercloud.json.swo | Bin 0 -> 12288 bytes json-files/.fedora-20-undercloud.json.swp | Bin 0 -> 12288 bytes json-files/fedora-20-undercloud.json | 41 +++++++ scripts/.deploy-overcloud.swp | Bin 0 -> 12288 bytes scripts/.install-undercloud.swp | Bin 0 -> 12288 bytes scripts/deploy-overcloud | 55 ++++++++++ scripts/install-undercloud | 68 ++++++++++++ 22 files changed, 417 insertions(+) create mode 100644 Overcloud.md create mode 100644 README.md create mode 100644 elements/undercloud-install/environment.d/.00-source-repo-refs.swp create mode 100755 elements/undercloud-install/environment.d/00-source-repo-refs create mode 100755 elements/undercloud-install/extra-data.d/00-cleanup create mode 100755 elements/undercloud-install/post-install.d/50-tripleo-incubator-path create mode 100755 elements/undercloud-install/post-install.d/90-restart-xinetd create mode 100755 elements/undercloud-install/pre-install.d/00-icehouse-repo create mode 100755 elements/undercloud-install/pre-install.d/00-setenforce-0 create mode 100755 elements/undercloud-install/pre-install.d/01-iptables create mode 100755 elements/undercloud-install/pre-install.d/01-pbr create mode 100755 elements/undercloud-install/pre-install.d/01-pip create mode 100755 elements/undercloud-install/pre-install.d/03-remove-mariadb-log create mode 100755 elements/undercloud-install/pre-install.d/04-sshd create mode 100755 elements/undercloud-install/pre-install.d/skel create mode 100644 json-files/.fedora-20-undercloud.json.swo create mode 100644 json-files/.fedora-20-undercloud.json.swp create mode 100644 json-files/fedora-20-undercloud.json create mode 100644 scripts/.deploy-overcloud.swp create mode 100644 scripts/.install-undercloud.swp create mode 100755 scripts/deploy-overcloud create mode 100755 scripts/install-undercloud diff --git a/Overcloud.md b/Overcloud.md new file mode 100644 index 000000000..fef58723a --- /dev/null +++ b/Overcloud.md @@ -0,0 +1,16 @@ +Overcloud +========= + +Once the Overcloud has deployed, you can use the devtest instructions to +interact with it. Start off with step 11 from +http://docs.openstack.org/developer/tripleo-incubator/devtest_overcloud.html. + +You won't be able to follow the steps exactly. Here's what you need to modify: + +* When $TRIPLEO_ROOT is used, replace with /opt/stack instead +* When running setup-neutron, correct subnet ranges will need to be used if + 192.0.2.0/24 is not applicable to the environment. +* When loading the user.qcow2 image into glance, I would use a cirros image + instead. Download the cirros image from + https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img + and specify the path to the downloaded file when you run the glance command. diff --git a/README.md b/README.md new file mode 100644 index 000000000..5d5aa39b1 --- /dev/null +++ b/README.md @@ -0,0 +1,100 @@ +Undercloud Install via instack +============================== + +1. Clone this repository + + git clone https://github.com/slagle/instack + +2. Create and edit your answers file. The descriptions of the parameters that + can be set are in the sample answers file. + + cd instack + cp instack.answers.sample instack.answers + # Return back to directory where instack was cloned + cd .. + +3. Run script to install undercloud. The script will produce a lot of output on + the sceen. It also logs to ~/.instack/install-undercloud.log. You should see + `install-undercloud Complete!` at the end of a successful run. + + instack/scripts/install-undercloud + +4. The install script has to manipulate your $PATH (until we get everything + packaged), so you'll need to start a new shell. + + bash + +4. Copy the stackrc file to your homedir so that you can use it a normal user. + + sudo cp /root/stackrc . + sudo chown $USER: stackrc + source stackrc + +4. Add your ssh key pair to nova + + user-config + +5. Download the deployment kernel and ramdisk + + curl -L -O http://fedorapeople.org/~slagle/slagle-tripleo-images-fedora-i2/deploy-ramdisk.initramfs + curl -L -O http://fedorapeople.org/~slagle/slagle-tripleo-images-fedora-i2/deploy-ramdisk.kernel + +5. Download overcloud images + + curl -L -O http://file.rdu.redhat.com/~jslagle/tripleo-images-fedora-i2-dib-patches/overcloud-compute.qcow2 + curl -L -O http://file.rdu.redhat.com/~jslagle/tripleo-images-fedora-i2-dib-patches/overcloud-control.qcow2 + +5. Load images into glance + + load-image overcloud-control.qcow2 + load-image overcloud-compute.qcow2 + +6. Use the setup-baremetal script to add your baremetal nodes + + # setup-baremetal requires this to be set + export TRIPLEO_ROOT=. + # $CPU = cpu count per node + # $MEM = memory per node in MB + # $DISK = disk per node in GB + # $ARCH = architecture of each node, i386 or amd64 + # $MACS = space separated list of node mac addresses + # $PM_IPS = space separated list of power management IP addresses + # $PM_USERS = space separated list of power management users + # $PM_PASSWORDS = space separated list of power management passwords + # $MACS and $PM_* variables should be in the same node order, e.g., the + # first MAC address should correspond to the first power management + # IP, etc. + setup-baremetal $CPU $MEM $DISK $ARCH "$MACS" undercloud "$PM_IPS" "$PM_USERS" "$PM_PASSWORDS" + +7. Create your overcloud heat template. You can adjust COMPUTESCALE to launch + more than one compute node if you choose to. + + sudo make -C /opt/stack/tripleo-heat-templates overcloud.yaml COMPUTESCALE=1 + +8. Create and source the overcloud passwords + + setup-overcloud-passwords + source tripleo-overcloud-passwords + +9. Deploy the overcloud + + # Define the interface that will be bridged onto the Neutron defined + # network. + NeutronPublicInterface=eth0 + # Define the overcloud libvirt type for virtualization. kvm for + # baremetal, qemu for an overcloud running in vm's. + OVERCLOUD_LIBVIRT_TYPE=kvm + + heat stack-create -f /opt/stack/tripleo-heat-templates/overcloud.yaml \ + -P AdminToken=${OVERCLOUD_ADMIN_TOKEN} \ + -P AdminPassword=${OVERCLOUD_ADMIN_PASSWORD} \ + -P CinderPassword=${OVERCLOUD_CINDER_PASSWORD} \ + -P GlancePassword=${OVERCLOUD_GLANCE_PASSWORD} \ + -P HeatPassword=${OVERCLOUD_HEAT_PASSWORD} \ + -P NeutronPassword=${OVERCLOUD_NEUTRON_PASSWORD} \ + -P NovaPassword=${OVERCLOUD_NOVA_PASSWORD} \ + -P NeutronPublicInterface=$NeutronPublicInterface \ + -P SwiftPassword=${OVERCLOUD_SWIFT_PASSWORD} \ + -P SwiftHashSuffix=${OVERCLOUD_SWIFT_HASH} \ + -P NovaComputeLibvirtType=$OVERCLOUD_LIBVIRT_TYPE \ + overcloud diff --git a/elements/undercloud-install/environment.d/.00-source-repo-refs.swp b/elements/undercloud-install/environment.d/.00-source-repo-refs.swp new file mode 100644 index 0000000000000000000000000000000000000000..d6cf360547812a9e83108529fedb63b5c80a8b0a GIT binary patch literal 12288 zcmeI2&u`pB6vwB5iXWv=fyALzr70F%z#i{zel$fnP#RFALPAI?S`Mr6c>IGn9?LUM zvwMJh`71cX-@sqc3kNPpoFQE4i3>cB?N#DM_U2e+EPXxMoj32j`S{IPtBmJ9*!m2w zIm-yHYY6>x4dA z##5;%J0Nl0g408uDoKje=Q&G6;oG_|NeEAm;#{O#_gPE0&aoqPQ>&Y z0vD3NRWuq7+;ZyHJGby#Z|+}63TD!VfFWQA7y^cXAz%m?0*1gvC7`lP=sTGFQVoFA z?WI;*e>9CDU>3Yvhv z23-dIaRtVMo`4QOAA+ucet#9AA3;;leb7zN$twu`3Hljy4|E;$1LQpcT?V}fD(A5T zGM6D>2p9r}fFWQA^bp|3naCBsw{>^CyScM{fBWN)_O`Y^9}79AS(Z%3Or${^ZbV9D zcL-55_h^zxXLe}M5qU_2w6(QeS+_sit}}230|!Ps;S{xE?mgVuoQnshZM)OC!9l;A z%V^>3YWq|9o&5$fbe*-H1Y1FSQe+}YI8zI!SlgdU@$5GhM7Jl$R@5@bHb>1no2W>n zW5(k|9CB5jvW($KmHUpcXez#SuM+H7^t#?_7Mq0iQ@EQoi_zh|_bV zA0{+q=kU(r>dfjHnik%d9M^0m4n&Ss#Br4~oLFtGh*_mq&UzMKWkjmR9=d~NSZ&_$ ze+y+>Km6KlR{`sX+!I*a5Pi4x`tB^w%41i|3UyD=%7|1=&un+9>DGR`LZ?;P^~A2N zNZl?Ly>YFVqBXzMHU-=hyD=lpAM?>IT-8y#ob)qqhRs&Eg{Ala*T<@H(~W~%95$7T zEL`sU5;p!&2sjV!=kXDDm^dVnkczl>A4jXB>71cQ6>VJ3hlX1C9H&y~SSPzDS5nE-!(D&Jhaermib$Q^? zwc*TIc(+hk7(lqRIS&8OSiKy;4Uqpmv16}EYC48PHD5id@O IM`eWm1HEt^g#Z8m literal 0 HcmV?d00001 diff --git a/elements/undercloud-install/environment.d/00-source-repo-refs b/elements/undercloud-install/environment.d/00-source-repo-refs new file mode 100755 index 000000000..d1aa39453 --- /dev/null +++ b/elements/undercloud-install/environment.d/00-source-repo-refs @@ -0,0 +1,47 @@ +#!/bin/bash + +set -eux + +export DIB_REPOTYPE_nova=tar +export DIB_REPOLOCATION_nova=http://tarballs.openstack.org/nova/nova-2014.1.b2.tar.gz + +# The heat icehouse-2 tarball had a blocker bug +# export DIB_REPOTYPE_heat=tar +# export +# DIB_REPOLOCATION_heat=http://tarballs.openstack.org/heat/heat-2014.1.b2.tar.gz +export DIB_REPOREF_heat=5f0f9f213c6cf2ddc3ced5600efba72785a3e939 + +# Getting a 403 from: +# https://googledrive.com/host/0Bwh63zyus-UlZ1dxQ08zczVRbXc/ipaddr-2.1.11.tar.gz +# so, install keystone from package +export DIB_REPOTYPE_keystone=package +# export +# DIB_REPOLOCATION_keystone=http://tarballs.openstack.org/keystone/keystone-2014.1.b2.tar.gz + +export DIB_REPOTYPE_neutron=tar +export DIB_REPOLOCATION_neutron=http://tarballs.openstack.org/neutron/neutron-2014.1.b2.tar.gz +export DIB_REPOTYPE_glance=tar +export DIB_REPOLOCATION_glance=http://tarballs.openstack.org/glance/glance-2014.1.b2.tar.gz +export DIB_REPOTYPE_swift=tar +export DIB_REPOLOCATION_swift=http://tarballs.openstack.org/swift/swift-1.11.0.tar.gz +export DIB_REOTYPE_cinder=tar +export DIB_REPOLOCATION_cinder=http://tarballs.openstack.org/cinder/cinder-2014.1.b2.tar.gz + +# Use packages for the clients +export DIB_REPOTYPE_python_cinderclient=package +export DIB_REPOTYPE_python_glanceclient=package +export DIB_REPOTYPE_python_heatclient=package +export DIB_REPOTYPE_python_keystoneclient=package +export DIB_REPOTYPE_python_neutronclient=package +export DIB_REPOTYPE_python_novaclient=package +export DIB_REPOTYPE_python_swiftclient=package +export DIB_REPOTYPE_python_ceilometerclient=package + +export DIB_REPOTYPE_os_collect_config=tar +export DIB_REPOLOCATION_os_collect_config=http://tarballs.openstack.org/os-collect-config/os-collect-config-0.1.10.tar.gz +export DIB_REPOTYPE_os_refresh_config=tar +export DIB_REPOLOCATION_os_refresh_config=http://tarballs.openstack.org/os-refresh-config/os-refresh-config-0.0.7.tar.gz +export DIB_REPOTYPE_os_apply_config=tar +export DIB_REPOLOCATION_os_apply_config=http://tarballs.openstack.org/os-apply-config/os-apply-config-0.1.11.tar.gz + + diff --git a/elements/undercloud-install/extra-data.d/00-cleanup b/elements/undercloud-install/extra-data.d/00-cleanup new file mode 100755 index 000000000..4a9dcf96d --- /dev/null +++ b/elements/undercloud-install/extra-data.d/00-cleanup @@ -0,0 +1,15 @@ +#!/bin/bash + +set -eux + +# Clean up from any previous runs... +# TODO: figure out if we want upstream patches for this along the lines of a +# "cleanup" element that cleans up the environment at the very beginning of a +# run. +sudo rm -rf \ + /var/lib/use-ephemeral \ + /etc/neutron/plugin.ini \ + /opt/stack \ + /usr/local/bin/* \ + /mnt/state \ + /var/lib/heat-cfntools diff --git a/elements/undercloud-install/post-install.d/50-tripleo-incubator-path b/elements/undercloud-install/post-install.d/50-tripleo-incubator-path new file mode 100755 index 000000000..e88a33f1e --- /dev/null +++ b/elements/undercloud-install/post-install.d/50-tripleo-incubator-path @@ -0,0 +1,13 @@ +#!/bin/bash + +set -eux + +# Add scripts directory from tripleo-incubator and diskimage-builder to the +# path. +# These scripts can't just be symlinked into a bin directory because they do +# directory manipulation that assumes they're in a known location. +if [ ! -e /etc/profile.d/tripleo-incubator-scripts.sh ]; then + sudo bash -c "echo export PATH='\$PATH':/opt/stack/tripleo-incubator/scripts/ >> /etc/profile.d/tripleo-incubator-scripts.sh" + sudo bash -c "echo export PATH=/opt/stack/diskimage-builder/bin/:'\$PATH' >> /etc/profile.d/tripleo-incubator-scripts.sh" +fi + diff --git a/elements/undercloud-install/post-install.d/90-restart-xinetd b/elements/undercloud-install/post-install.d/90-restart-xinetd new file mode 100755 index 000000000..ea22bf555 --- /dev/null +++ b/elements/undercloud-install/post-install.d/90-restart-xinetd @@ -0,0 +1,8 @@ +#!/bin/bash + +set -eux + +# xinetd controls starting the tftpd daemon so pxelinux.0 can be downloaded. +# This is not needed upstream b/c usually it starts on boot, but we aren't +# booting an undercloud here, we're installing one. +systemctl restart xinetd diff --git a/elements/undercloud-install/pre-install.d/00-icehouse-repo b/elements/undercloud-install/pre-install.d/00-icehouse-repo new file mode 100755 index 000000000..8a59ccc98 --- /dev/null +++ b/elements/undercloud-install/pre-install.d/00-icehouse-repo @@ -0,0 +1,5 @@ +#!/bin/bash + +set -eux + +install-packages http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-1.noarch.rpm diff --git a/elements/undercloud-install/pre-install.d/00-setenforce-0 b/elements/undercloud-install/pre-install.d/00-setenforce-0 new file mode 100755 index 000000000..4f00d7644 --- /dev/null +++ b/elements/undercloud-install/pre-install.d/00-setenforce-0 @@ -0,0 +1,5 @@ +#!/bin/bash + +set -eux + +setenforce 0 diff --git a/elements/undercloud-install/pre-install.d/01-iptables b/elements/undercloud-install/pre-install.d/01-iptables new file mode 100755 index 000000000..c93f7ed0b --- /dev/null +++ b/elements/undercloud-install/pre-install.d/01-iptables @@ -0,0 +1,12 @@ +#!/bin/bash + +set -eux + +# Needed for our iptables rules +yum -y erase firewalld +install-packages iptables-services +# This does not happen automatically, but is required in the systemd service +# file for iptables: ConditionPathExists=/etc/sysconfig/iptables +touch /etc/sysconfig/iptables +os-svc-enable -n iptables +os-svc-restart -n iptables diff --git a/elements/undercloud-install/pre-install.d/01-pbr b/elements/undercloud-install/pre-install.d/01-pbr new file mode 100755 index 000000000..cc2a12d86 --- /dev/null +++ b/elements/undercloud-install/pre-install.d/01-pbr @@ -0,0 +1,5 @@ +#!/bin/bash + +set -eux + +install-packages python-pbr diff --git a/elements/undercloud-install/pre-install.d/01-pip b/elements/undercloud-install/pre-install.d/01-pip new file mode 100755 index 000000000..5d1adf518 --- /dev/null +++ b/elements/undercloud-install/pre-install.d/01-pip @@ -0,0 +1,5 @@ +#!/bin/bash + +set -eux + +install-packages python-pip diff --git a/elements/undercloud-install/pre-install.d/03-remove-mariadb-log b/elements/undercloud-install/pre-install.d/03-remove-mariadb-log new file mode 100755 index 000000000..45fb17be7 --- /dev/null +++ b/elements/undercloud-install/pre-install.d/03-remove-mariadb-log @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eux + +# Workaround for: +# https://bugzilla.redhat.com/show_bug.cgi?id=1061045 +# Go ahead and install mariadb-server, and remove the logfile with wrong +# permissions. +install-packages mariadb-server +rm -f /var/log/mariadb/mariadb.log diff --git a/elements/undercloud-install/pre-install.d/04-sshd b/elements/undercloud-install/pre-install.d/04-sshd new file mode 100755 index 000000000..2cbf0d050 --- /dev/null +++ b/elements/undercloud-install/pre-install.d/04-sshd @@ -0,0 +1,7 @@ +#!/bin/bash + +set -eux + +# Make sure ssh is enabled and running +systemctl enable sshd +systemctl start sshd diff --git a/elements/undercloud-install/pre-install.d/skel b/elements/undercloud-install/pre-install.d/skel new file mode 100755 index 000000000..04ae68460 --- /dev/null +++ b/elements/undercloud-install/pre-install.d/skel @@ -0,0 +1,5 @@ +#!/bin/bash + +set -eux + + diff --git a/json-files/.fedora-20-undercloud.json.swo b/json-files/.fedora-20-undercloud.json.swo new file mode 100644 index 0000000000000000000000000000000000000000..bfa24fc41fdadcac319f090499038797f516ace6 GIT binary patch literal 12288 zcmeI2ziSjh6vrnitc(T)1q)eMER;;{E*c_&tzcmjP>Unr?Ck8_=H_;mo!R5$h}x&K zuouL?K(N=!TCfY&3fc-5;&<=%N6zTgif`b<-0tj~dHb1ZmU}__-t9Zy*7`Muw#wMS z`S06Lmd~(Hml)f%TJ*FkMiw@wv~rn9cxT~b>`^&kOPWx%da>*0L2I@~%cLr?PRKzk zF8f_;5+21`*;b@NlL@}j=6MpTOlp&d>&5uu^=Om~kb%-b?jnADgfDDiUGC&5%02v?y|B(TgF0sdW-{tb1FPHt&FMWAQ9T^}4WPl8i0Wv@a z$N(8217v^CRUI<{{OGO|9_lh>fDHUK26mX|?E%j#eihAcZ}JGW&H>MiagpU(1WNmCI_UYE z9Uf;UiKW!BN}Rt|4RjDTD}>I}(2NxCWqD8z`+-L7w2rOwZ+P8l#7-R;4u-a#{$W0> zV$@jbJX9Rz+rwg|qmikxj!z4+b(3IqUC*Cps(z@xsm3S?=b><-TCQ)*;5TbnrQ;+Y z^HgQS*xGoc>Rg*@Z$7OJ=h7rm+-sC1DtBQFU=#LcHkys^a4CiCmv6Xm(+*3mPC#*9%1rz}*bHMF Wt32VU$Xv7Ofv{>CIPvDv?6RM;hWRr9 literal 0 HcmV?d00001 diff --git a/json-files/.fedora-20-undercloud.json.swp b/json-files/.fedora-20-undercloud.json.swp new file mode 100644 index 0000000000000000000000000000000000000000..15ac131327161ba2a1ca383acb3aab1e5ec80a29 GIT binary patch literal 12288 zcmeI2ziSjh6vro)ViHlb6V|n`ak6*OXz&k^Sco8KiX-6c?Cjm<=606dnQ)RsThY!= z1g*5P)4xC~YgJJ)Y`SC%d@jN^=* z+1tD2)=smB>x^v{TJ*IlS7r{Yw6eKKd3WYEcE1i7NE4}`pV)y5gDOX0GL;rq$YGGw z^JZaE9w%BAL98N^3%=apE{#+!wQxjs7|t&#yUP#bVI=BxAU;&QiB-Z|%=^-i9+ zO?t=x86X2>fDDiUGC&5%02%m?4A^XrJ;3uGsh|0LJzAppIL@U>~myyh=2^ zS7~kPJg8$EGIy(}?Q8FJxs*ZO}0N+i4uHwT*@<%+v&>-MWH4K Lw>^J6eaBnlJ|<-i5$jce2*v0gV#C^E8;aZF;>u`Sz4#b>nMowcW4&un&Q z^8sqPaiRyrf4~JK;LMo=5(hZ&FTkmA0Tpp*FZ|Ya;}ACCOf@S#*?4x|d1sz|cO}cy zFK*R0=t^Ok;dq*{owd82g)`5w+b=M7Jr0~fz|$+I9-0SSM~<{Eo!X7voDFEZ%H#Gx z=wZ^gr#WmDav5vK9ob@bj@?LvI<`F?2I|04yF79Om3XJ;FjtKMW8fqMXW8YYOU3l+ z`P?F%duH>bj;7rhFb0ePW55_N28;n?z!)$F9zX*+Twot!T@TIHc4c;6ICh?WG$&)g z7%&Em0b{@zFb0ePW55_N28;n?z!>-+8gTG?`frai_RASe9>4$J|Nj5yQ;gjKzk=J~ zC-4pU0(=fa&<1(12nak2&Vk>bWb8-q1NaPl3_b!kKmx9V*T5s-VQ}v(V|T&V;4APY z_ykBW1{cBeU;%vl1Y@_r4hX?TaPM)(z6YOz_kacddW^B}z%B3=coF=8HKyzQIbEwc zi~(c77%&Em0b{@zcyJ96j`{A%^pn-5rrLF?Y8)n-H$;C|M7nnn@^ZelRqIq6t8{^67SML$cuz%M zM)!85+r8H6tR4wz@uRl;-kKrSOp^_|mK))JPL@yDwX5yvu3e4Ix&c>K+RxH_90uqU z+lO^mIB>=R#$oevIa*-l9X?LjdFne6A9L*lFHzb;zKY0^^YW!Aky6M32}!%-3vmH4 ztK1iolOFOT{eo#xlSWlfMoCLNaRTwaqlJ5%+5n zNugy=1OfFq^&{a8xJOEAHJQ$AZ1N^E#5b*2C6SA%&SV|hvBFsi#w_MK3Fo_=k6b}` z;wc(CBgn7*xBR({sr+hdqrKUyb*q&|t&FYOalm;-<*V&Y%5T&*D8E|o zUZs4cQ(dQAexp+D<|s+)aMVSi z-Far7nfdNBlY~6A$mKr5gX&qSKxE-9(WgA1h0WM zI1KIum&X~q0M3Ia!7^xoI+y~xz~$YHy$PNN&w^(_8=L_-@CeugGT`d1jQtLN1Ydwl z;4Sb9cn;LT3^)QF1b2f!u=cCq2kntO9s z9{x+^g<|DcE?-Qm3+4H^&$`(qRqH00bf3eaC!@gTw6|17gZ#;Ap;SrpZ?l#cKFx!W zu|DI`z55&ycvcI2Cik1!Z0FpR)Q(zYw7bH(E@2yC`;<9%xI?uzb%()+p)W(BWFR=) z)&<_OFMS6E5wd{^p>40oNcHVD16$HwNk2Z(J_?)8CNCd;I$m7qacU~%heymL%Q$Px zR+?$NapW*jr^jf5jLp2$6AzPWat{kz;^bj%@#AJwr5f^~?Iy`ODZvL9+X+O!t(wxK zkgLeg`aSW6)!^P!B9LAj_-k6#xq|y{4z-cwX{R~{yd@PU%W>8>7$M5gR?EUQrqb1W z$hw)-*B=blUfda+vaCDh zKM~0#xw8$t^CWBL`PG`+5%%*UvsPBczKz-ko;e-bk z^hYnUqBv%huq`F >(tee $LOGFILE) +exec 2>&1 + +# generate ssh authentication keys if they don't exist +if [ ! -f ~/.ssh/id_rsa ]; then + ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa +fi + +sudo yum -y install python-pip + +pushd instack + sudo pip install -e . +popd + +# Upstream dib is fine +if [ ! -d diskimage-builder ]; then + git clone https://git.openstack.org/openstack/diskimage-builder + pushd diskimage-builder + git remote add github-slagle https://github.com/slagle/diskimage-builder.git + git fetch github-slagle + git checkout environmentd + sudo python setup.py install + popd +fi + +# We need the undercloud-stack-config branch of tie +if [ ! -d tripleo-image-elements ]; then + git clone https://github.com/slagle/tripleo-image-elements + pushd tripleo-image-elements + git checkout undercloud-stack-config + popd +fi + +# Needed by source-repositories +sudo yum -y install tar + +INSTACK_DIR=$(dirname $0)/.. + +source $INSTACK_DIR/instack.answers + +export LOCAL_IP +export DNSMASQ_START +export DNSMASQ_END +export LOCAL_INTERFACE +export MASQUERADE_NETWORK +export POWER_DRIVER +export VIRTUAL_POWER_USER +export VIRTUAL_POWER_HOST +export DHCP_START +export DHCP_END +export NETWORK_CIDR +export NETWORK_GATEWAY + +sudo -E instack \ + -p diskimage-builder/elements/ tripleo-image-elements/elements/ instack/elements \ + -j instack/json-files/fedora-20-undercloud.json + +sudo os-refresh-config + +echo "install-undercloud Complete!"