-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmasterinstall
executable file
·43 lines (39 loc) · 1.99 KB
/
masterinstall
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
#!/bin/bash
set -e
source "$(dirname $(readlink -f $0))/_functions"
echo "[Unit]
Description=OVC IP
[Service]
ExecStart=/sbin/ip a a 172.17.1.1/16 dev eth0
RestartSec=5
Restart=on-failure
Type=simple
" > /etc/systemd/system/multi-user.target.wants/ovcstartup.service
debconf-set-selections <<< "postfix postfix/mailname string ovc.local"
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
apt-get install -y postfix
systemctl enable postfix
systemctl start postfix
#installjs
# RUN PACKAGER HERE
export LC_ALL=C
apt-get install python-pip nginx -y
pip install requests oyaml click
export MANIFESTURL=https://raw.githubusercontent.com/0-complexity/devmanifests/master/manifests/
export VERSION=9.9.9
rm -fr /etc/nginx/sites-enabled/default
cp /opt/code/github/0-complexity/openvcloud/apps/nginx/ms1_fe /etc/nginx/sites-enabled
systemctl restart nginx
python /opt/code/github/0-complexity/openvcloud_installer/scripts/buildlib/packager.py --manifest /opt/code/github/0-complexity/openvcloud_installer/scripts/dockers/cb_master/dep-manifest.yml -l
cp -r /opt/code/github/0-complexity/openvcloud_installer/scripts/dockers/cb_master/apps/* /opt/jumpscale7/cfg/
jspython /opt/code/github/0-complexity/openvcloud_installer/scripts/install/installnode --role=master --masterips 127.0.0.1 --password=rooter --fqdn=172.17.1.1 --env_subdomain=devsetup --client_id=greenitglobe.development.environments.local --secret=7b6nPW0EpZ3XGAPPxrs3nV8g5119yLcAmoQGUqlXn8uT_hciAIZF --gid=66 --ovs_url=https://172.17.1.10
echo "
pcl = j.clients.portal.getByInstance('main')
pcl.actors.cloudbroker.iaas.addExternalNetwork(name='docknet', subnet='172.17.0.0/16', gateway='172.17.0.1', startip='172.17.1.100', endip='172.17.1.120', gid=66, vlan=0)
lcl = j.clients.osis.getNamespace('libvirt')
if not lcl.vnc.list():
vnc = lcl.vnc.new()
vnc.gid = 66
vnc.url = 'http://172.17.1.10:8091/vnc_auto.html?token='
lcl.vnc.set(vnc)
" | js