~ggouzi/obinstall/obinstall

« back to all changes in this revision

Viewing changes to demos/kubernetes/01-deploy.sh

  • Committer: MMorana
  • Date: 2016-03-24 01:18:40 UTC
  • Revision ID: mass@ubuntu.com-20160324011840-blxydmf7ca4ggle0
Splitting out demos from install

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
#Install juju-deployer package
4
 
#sudo apt-get install -y juju-deployer
5
 
 
6
 
#Deploy the bundle
7
 
#TODO: soft link to bundle to stable and bleeding edge charm revisions
8
 
 
9
 
set -e
10
 
 
11
 
if [[ -d bundle-kubernetes/ ]]
12
 
then
13
 
    export JUJU_REPOSITORY=$PWD
14
 
    juju-deployer -c bundle-kubernetes/bundles.yaml
15
 
else
16
 
    echo "git clone git clone https://github.com/kapilt/bundle-kubernetes.git"
17
 
    git clone https://github.com/kapilt/bundle-kubernetes.git
18
 
    export JUJU_REPOSITORY=$PWD
19
 
    juju-deployer -c bundle-kubernetes/bundles.yaml
20
 
 
21
 
fi
22
 
 
23
 
if [ -d kubernetes/ ]
24
 
then
25
 
    echo "Kubernetes CLI tools and examples has been already downloaded"
26
 
else
27
 
    echo "Download Kubernetes CLI tools and examples"
28
 
    wget https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.8.1/kubernetes.tar.gz
29
 
    tar zxvf kubernetes.tar.gz
30
 
    rm -f kubernetes.tar.gz
31
 
fi
32
 
 
33
 
echo "Run: $ export PATH=${PATH}:${PWD}/kubernetes/platforms/linux/amd64"
34
 
echo "Run: $ export KUBERNETES_MASTER=`juju status kubernetes-master | grep public-address | awk '{ print $2 }' | xargs host | grep address | awk '{ print $4 }'`"
35
 
echo "Run Kubernate examples, README is kubernetes/examples/cassandra/README.md"