Updating the util.sh script to work with latest version of juju.

pull/6/head
Matt Bruzek 2016-08-04 12:04:16 -05:00
parent 42a12a4cd6
commit b9ac078be7
3 changed files with 10 additions and 7 deletions

View File

@ -1,13 +1,13 @@
services:
kubernetes:
charm: local:trusty/kubernetes
charm: __CHARM_DIR__/builds/kubernetes
annotations:
"gui-x": "600"
"gui-y": "0"
expose: true
num_units: 2
etcd:
charm: cs:~containers/trusty/etcd
charm: cs:~containers/etcd
annotations:
"gui-x": "300"
"gui-y": "0"
@ -15,4 +15,4 @@ services:
relations:
- - "kubernetes:etcd"
- "etcd:db"
series: trusty
series: xenial

View File

@ -16,4 +16,4 @@ requires:
etcd:
interface: etcd
series:
- 'trusty'
- xenial

View File

@ -18,7 +18,7 @@
set -o errexit
set -o nounset
set -o pipefail
#set -o xtrace
set -o xtrace
UTIL_SCRIPT=$(readlink -m "${BASH_SOURCE}")
JUJU_PATH=$(dirname ${UTIL_SCRIPT})
@ -38,7 +38,7 @@ function build-local() {
# This used to build the kubernetes project. Now it rebuilds the charm(s)
# living in `cluster/juju/layers`
charm build -o $JUJU_REPOSITORY -s trusty ${JUJU_PATH}/layers/kubernetes
charm build ${JUJU_PATH}/layers/kubernetes -o $JUJU_REPOSITORY -r --no-local-layers
}
function detect-master() {
@ -69,6 +69,9 @@ function detect-nodes() {
function kube-up() {
build-local
# Replace the charm directory in the bundle.
sed "s|__CHARM_DIR__|${JUJU_REPOSITORY}|" < ${KUBE_BUNDLE_PATH}.base > ${KUBE_BUNDLE_PATH}
# The juju-deployer command will deploy the bundle and can be run
# multiple times to continue deploying the parts that fail.
juju deploy ${KUBE_BUNDLE_PATH}
@ -117,7 +120,7 @@ function sleep-status() {
while [[ $i < $maxtime && -z $jujustatus ]]; do
sleep 15
i+=15
i=$((i + 15))
jujustatus=$(${JUJU_PATH}/identify-leaders.py)
export KUBE_MASTER_NAME=${jujustatus}
done