This repository was archived by the owner on Mar 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcharmbox-setup.sh
executable file
·57 lines (51 loc) · 1.62 KB
/
charmbox-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
set -ex
# Bundletester and friends in tims ppa
sudo add-apt-repository -u -y ppa:tvansteenburgh/ppa
sudo apt-get update -qq
sudo apt-get install -qy \
build-essential \
git \
juju-deployer \
libssl-dev \
make \
python-dev \
python-jujuclient \
python-pip \
python-virtualenv \
python3-dev \
python3-pip \
python3-flake8 \
rsync \
wget \
unzip
sudo pip install --upgrade pip six
sudo pip install amulet flake8 bundletester tox
sudo pip3 install --upgrade pip
sudo pip3 install amulet
# charmstore-client should be installed with snap, but docker can't do that.
# Live a little; let's GO!
mkdir -p /tmp/charm-go /tmp/charm-gopath
(
cd /tmp/charm-go
wget https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz
tar zxf go1.12.6.linux-amd64.tar.gz
)
export GOROOT=/tmp/charm-go/go
export GOPATH=/tmp/charm-gopath
export PATH=${GOPATH}/bin:${GOROOT}/bin:${PATH}
# NB: no go files in root, but we just need the source, so || true
go get github.com/juju/charmstore-client || true
(
cd ${GOPATH}/src/github.com/juju/charmstore-client
make deps install
sudo mv ${GOPATH}/bin/charm* /usr/local/bin
)
# kthxbye
rm -rf /tmp/charm-go /tmp/charm-gopath
# Install charm-tools from source
git clone https://github.com/juju/charm-tools /tmp/charm-tools
cd /tmp/charm-tools
sudo pip3 install .
cd ..
rm -rf charm-tools