3
# hp-proliant-bootstrap-juju - bootstrap Juju to one vm
4
# Copyright (C) 2014 Canonical Ltd.
6
# Authors: Dustin Kirkland <kirkland@canonical.com>
7
# Kent Baxley <kent.baxley@canonical.com>
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.
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.
17
# 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/>.
24
juju status && echo "Existing deployment found, exiting." && exit 0
25
juju bootstrap --constraints "tags=bootstrap" --show-log --upload-tools
27
#accept the nodes which all already declared
28
#commission the other hardware nodes
29
maas admin nodes accept-all
31
juju set-constraints "tags="
34
juju deploy --to 0 cs:~hazmat/trusty/juju-gui-2 juju-gui
37
#copy the bundle to the maas server for future deployment
39
bzr branch lp:~hp-proliant/charms/bundles/web-in-a-box/bundle /home/ubuntu/web-in-a-box
41
#display the ip address of the juju-gui
42
juju_address=$(nslookup moonshotvm.maas | grep "Address: " | cut -d " " -f2)
43
echo "JUJU GUI details: name: moonshotvm.maas IP Address:" $juju_address