Newer
Older
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
#!/bin/bash
echo $0 started at $(date)
sudo snap install microk8s --classic --channel=1.26/stable
sudo snap install jq
sudo mkdir -p /var/snap/microk8s/current/args/certs.d/docker.io
cat << EOF | sudo tee /var/snap/microk8s/current/args/certs.d/docker.io/hosts.toml
server = "http://172.21.1.1:5000"
[host."http://172.21.1.1:5000"]
capabilities = ["pull", "resolve"]
skip_verify = true
plain-http = true
EOF
sudo systemctl restart snap.microk8s.daemon-containerd.service
sudo microk8s.enable storage
sudo snap alias microk8s.kubectl kubectl
wget https://osm-download.etsi.org/ftp/osm-13.0-thirteen/install_osm.sh
chmod +x ./install_osm.sh
./install_osm.sh --charmed -R testing-daily -t testing-daily -r testing -y 2>&1 | tee charmed_install_log.txt
# Set our environment to talk to the new OSM
grep '^export OSM' ~/charmed_install_log.txt >> ~/.bashrc
while [ 1 ] ; do
osm version
if [ $? -eq 0 ]; then break ; fi
done
# Expose our services
sudo sed -i "s/127.0.0.1 /127.0.0.1 nbi.osm ui.osm grafana.osm prometheus.osm /" /etc/hosts
juju config -m osm grafana site_url=https://grafana.osm
juju config -m osm prometheus site_url=https://prometheus.osm
juju config -m osm nbi external-hostname=nbi.osm
juju config -m osm ng-ui external-hostname=ui.osm
echo "export OSM_HOSTNAME=nbi.osm:443" >> .bashrc
echo "export OSM_HOSTNAME=nbi.osm:443" >> .profile
echo "export OSM_PASSWORD=hackfest" >> .bashrc
echo "export OSM_PASSWORD=hackfest" >> .profile
# Set some sane defaults for LXD
lxc profile set default limits.memory 1GB
lxc profile set default limits.cpu 2
echo $0 $@ complete at $(date)