mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Updating the util.sh script to work with latest version of juju.
This commit is contained in:
parent
42a12a4cd6
commit
b9ac078be7
@ -1,13 +1,13 @@
|
|||||||
services:
|
services:
|
||||||
kubernetes:
|
kubernetes:
|
||||||
charm: local:trusty/kubernetes
|
charm: __CHARM_DIR__/builds/kubernetes
|
||||||
annotations:
|
annotations:
|
||||||
"gui-x": "600"
|
"gui-x": "600"
|
||||||
"gui-y": "0"
|
"gui-y": "0"
|
||||||
expose: true
|
expose: true
|
||||||
num_units: 2
|
num_units: 2
|
||||||
etcd:
|
etcd:
|
||||||
charm: cs:~containers/trusty/etcd
|
charm: cs:~containers/etcd
|
||||||
annotations:
|
annotations:
|
||||||
"gui-x": "300"
|
"gui-x": "300"
|
||||||
"gui-y": "0"
|
"gui-y": "0"
|
||||||
@ -15,4 +15,4 @@ services:
|
|||||||
relations:
|
relations:
|
||||||
- - "kubernetes:etcd"
|
- - "kubernetes:etcd"
|
||||||
- "etcd:db"
|
- "etcd:db"
|
||||||
series: trusty
|
series: xenial
|
@ -16,4 +16,4 @@ requires:
|
|||||||
etcd:
|
etcd:
|
||||||
interface: etcd
|
interface: etcd
|
||||||
series:
|
series:
|
||||||
- 'trusty'
|
- xenial
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
#set -o xtrace
|
set -o xtrace
|
||||||
|
|
||||||
UTIL_SCRIPT=$(readlink -m "${BASH_SOURCE}")
|
UTIL_SCRIPT=$(readlink -m "${BASH_SOURCE}")
|
||||||
JUJU_PATH=$(dirname ${UTIL_SCRIPT})
|
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)
|
# This used to build the kubernetes project. Now it rebuilds the charm(s)
|
||||||
# living in `cluster/juju/layers`
|
# 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() {
|
function detect-master() {
|
||||||
@ -69,6 +69,9 @@ function detect-nodes() {
|
|||||||
function kube-up() {
|
function kube-up() {
|
||||||
build-local
|
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
|
# The juju-deployer command will deploy the bundle and can be run
|
||||||
# multiple times to continue deploying the parts that fail.
|
# multiple times to continue deploying the parts that fail.
|
||||||
juju deploy ${KUBE_BUNDLE_PATH}
|
juju deploy ${KUBE_BUNDLE_PATH}
|
||||||
@ -117,7 +120,7 @@ function sleep-status() {
|
|||||||
|
|
||||||
while [[ $i < $maxtime && -z $jujustatus ]]; do
|
while [[ $i < $maxtime && -z $jujustatus ]]; do
|
||||||
sleep 15
|
sleep 15
|
||||||
i+=15
|
i=$((i + 15))
|
||||||
jujustatus=$(${JUJU_PATH}/identify-leaders.py)
|
jujustatus=$(${JUJU_PATH}/identify-leaders.py)
|
||||||
export KUBE_MASTER_NAME=${jujustatus}
|
export KUBE_MASTER_NAME=${jujustatus}
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user