Merge changes I4396d3ef,I1f9ce570
[osm/devops.git] / installers / install_osm.sh
1 #!/bin/bash
2 # Copyright 2016 Telefónica Investigación y Desarrollo S.A.U.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 function usage(){
17 echo -e "usage: $0 [OPTIONS]"
18 echo -e "Install OSM from binaries or source code (by default, from binaries)"
19 echo -e " OPTIONS"
20 echo -e " --uninstall: uninstall OSM: remove the containers and delete NAT rules"
21 echo -e " --source: install OSM from source code using the latest stable tag"
22 echo -e " -r <repo>: use specified repository name for osm packages"
23 echo -e " -R <release>: use specified release for osm packages"
24 echo -e " -u <repo base>: use specified repository url for osm packages"
25 echo -e " -k <repo key>: use specified repository public key url"
26 echo -e " -b <refspec>: install OSM from source code using a specific branch (master, v2.0, ...) or tag"
27 echo -e " -b master (main dev branch)"
28 echo -e " -b v2.0 (v2.0 branch)"
29 echo -e " -b tags/v1.1.0 (a specific tag)"
30 echo -e " ..."
31 echo -e " --develop: (deprecated, use '-b master') install OSM from source code using the master branch"
32 echo -e " --nat: install only NAT rules"
33 # echo -e " --update: update to the latest stable release or to the latest commit if using a specific branch"
34 echo -e " --showopts: print chosen options and exit (only for debugging)"
35 echo -e " -y: do not prompt for confirmation, assumes yes"
36 echo -e " -h / --help: print this help"
37 }
38
39 #Uninstall OSM: remove containers
40 function uninstall(){
41 echo -e "\nUninstalling OSM"
42 if [ $RC_CLONE ] || [ -n "$TEST_INSTALLER" ]; then
43 $OSM_DEVOPS/jenkins/host/clean_container RO
44 $OSM_DEVOPS/jenkins/host/clean_container VCA
45 $OSM_DEVOPS/jenkins/host/clean_container SO
46 #$OSM_DEVOPS/jenkins/host/clean_container UI
47 else
48 lxc stop RO && lxc delete RO
49 lxc stop VCA && lxc delete VCA
50 lxc stop SO-ub && lxc delete SO-ub
51 fi
52 }
53
54 #Configure NAT rules, based on the current IP addresses of containers
55 function nat(){
56 echo -e "\nChecking required packages: iptables-persistent"
57 dpkg -l iptables-persistent &>/dev/null || ! echo -e " Not installed.\nInstalling iptables-persistent requires root privileges" || \
58 sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install iptables-persistent
59 echo -e "\nConfiguring NAT rules"
60 echo -e " Required root privileges"
61 sudo $OSM_DEVOPS/installers/nat_osm
62 }
63
64 #Update RO, SO and UI:
65 function update(){
66 echo -e "\nUpdating components"
67
68 echo -e " Updating RO"
69 CONTAINER="RO"
70 MDG="RO"
71 INSTALL_FOLDER="/opt/openmano"
72 echo -e " Fetching the repo"
73 lxc exec $CONTAINER -- git -C $INSTALL_FOLDER fetch --all
74 BRANCH=""
75 BRANCH=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER status -sb | head -n1 | sed -n 's/^## \(.*\).*/\1/p'|awk '{print $1}' |sed 's/\(.*\)\.\.\..*/\1/'`
76 [ -z "$BRANCH" ] && FATAL "Could not find the current branch in use in the '$MDG'"
77 CURRENT=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER status |head -n1`
78 CURRENT_COMMIT_ID=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER rev-parse HEAD`
79 echo " FROM: $CURRENT ($CURRENT_COMMIT_ID)"
80 # COMMIT_ID either was previously set with -b option, or is an empty string
81 CHECKOUT_ID=$COMMIT_ID
82 [ -z "$CHECKOUT_ID" ] && [ "$BRANCH" == "HEAD" ] && CHECKOUT_ID="tags/$LATEST_STABLE_DEVOPS"
83 [ -z "$CHECKOUT_ID" ] && [ "$BRANCH" != "HEAD" ] && CHECKOUT_ID="$BRANCH"
84 if [[ $CHECKOUT_ID == "tags/"* ]]; then
85 REMOTE_COMMIT_ID=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER rev-list -n 1 $CHECKOUT_ID`
86 else
87 REMOTE_COMMIT_ID=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER rev-parse origin/$CHECKOUT_ID`
88 fi
89 echo " TO: $CHECKOUT_ID ($REMOTE_COMMIT_ID)"
90 if [ "$CURRENT_COMMIT_ID" == "$REMOTE_COMMIT_ID" ]; then
91 echo " Nothing to be done."
92 else
93 echo " Update required."
94 lxc exec $CONTAINER -- service osm-ro stop
95 lxc exec $CONTAINER -- git -C /opt/openmano stash
96 lxc exec $CONTAINER -- git -C /opt/openmano pull --rebase
97 lxc exec $CONTAINER -- git -C /opt/openmano checkout $CHECKOUT_ID
98 lxc exec $CONTAINER -- git -C /opt/openmano stash pop
99 lxc exec $CONTAINER -- /opt/openmano/database_utils/migrate_mano_db.sh
100 lxc exec $CONTAINER -- service osm-ro start
101 fi
102 echo
103
104 echo -e " Updating SO and UI"
105 CONTAINER="SO-ub"
106 MDG="SO"
107 INSTALL_FOLDER="" # To be filled in
108 echo -e " Fetching the repo"
109 lxc exec $CONTAINER -- git -C $INSTALL_FOLDER fetch --all
110 BRANCH=""
111 BRANCH=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER status -sb | head -n1 | sed -n 's/^## \(.*\).*/\1/p'|awk '{print $1}' |sed 's/\(.*\)\.\.\..*/\1/'`
112 [ -z "$BRANCH" ] && FATAL "Could not find the current branch in use in the '$MDG'"
113 CURRENT=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER status |head -n1`
114 CURRENT_COMMIT_ID=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER rev-parse HEAD`
115 echo " FROM: $CURRENT ($CURRENT_COMMIT_ID)"
116 # COMMIT_ID either was previously set with -b option, or is an empty string
117 CHECKOUT_ID=$COMMIT_ID
118 [ -z "$CHECKOUT_ID" ] && [ "$BRANCH" == "HEAD" ] && CHECKOUT_ID="tags/$LATEST_STABLE_DEVOPS"
119 [ -z "$CHECKOUT_ID" ] && [ "$BRANCH" != "HEAD" ] && CHECKOUT_ID="$BRANCH"
120 if [[ $CHECKOUT_ID == "tags/"* ]]; then
121 REMOTE_COMMIT_ID=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER rev-list -n 1 $CHECKOUT_ID`
122 else
123 REMOTE_COMMIT_ID=`lxc exec $CONTAINER -- git -C $INSTALL_FOLDER rev-parse origin/$CHECKOUT_ID`
124 fi
125 echo " TO: $CHECKOUT_ID ($REMOTE_COMMIT_ID)"
126 if [ "$CURRENT_COMMIT_ID" == "$REMOTE_COMMIT_ID" ]; then
127 echo " Nothing to be done."
128 else
129 echo " Update required."
130 # Instructions to be added
131 # lxc exec SO-ub -- ...
132 fi
133 echo
134 }
135
136 function so_is_up() {
137 SO_IP=$1
138 time=0
139 step=5
140 timelength=300
141 while [ $time -le $timelength ]
142 do
143 if [[ `curl -k -X GET https://$SO_IP:8008/api/operational/vcs/info \
144 -H 'accept: application/vnd.yang.data+json' \
145 -H 'authorization: Basic YWRtaW46YWRtaW4=' \
146 -H 'cache-control: no-cache' 2> /dev/null | jq '.[].components.component_info[] | select(.component_name=="RW.Restconf")' 2>/dev/null | grep "RUNNING" | wc -l` -eq 1 ]]
147 then
148 echo "RW.Restconf running....SO is up"
149 return 0
150 fi
151
152 sleep $step
153 echo -n "."
154 time=$((time+step))
155 done
156
157 FATAL "OSM Failed to startup"
158 }
159
160 #Configure VCA, SO and RO with the initial configuration:
161 # RO -> tenant:osm, logs to be sent to SO
162 # VCA -> juju-password
163 # SO -> route to Juju Controller, add RO account, add VCA account
164 function configure(){
165 #Configure components
166 echo -e "\nConfiguring components"
167 . $OSM_DEVOPS/installers/export_ips
168
169 echo -e " Configuring RO"
170 lxc exec RO -- sed -i -e "s/^\#\?log_socket_host:.*/log_socket_host: $SO_CONTAINER_IP/g" /etc/osm/openmanod.cfg
171 lxc exec RO -- service osm-ro restart
172
173 time=0; step=2; timelength=20; while [ $time -le $timelength ]; do sleep $step; echo -n "."; time=$((time+step)); done; echo
174
175 lxc exec RO -- openmano tenant-delete -f osm >/dev/null
176 RO_TENANT_ID=`lxc exec RO -- openmano tenant-create osm |awk '{print $1}'`
177 lxc exec RO -- sed -i '/export OPENMANO_TENANT=osm/d' .bashrc
178 lxc exec RO -- sed -i '$ i export OPENMANO_TENANT=osm' .bashrc
179 #lxc exec RO -- sh -c 'echo "export OPENMANO_TENANT=osm" >> .bashrc'
180
181 echo -e " Configuring VCA"
182 JUJU_PASSWD=`date +%s | sha256sum | base64 | head -c 32`
183 echo -e "$JUJU_PASSWD\n$JUJU_PASSWD" | lxc exec VCA -- juju change-user-password
184 JUJU_CONTROLLER_IP=`lxc exec VCA -- lxc list -c 4 |grep eth0 |awk '{print $2}'`
185
186 echo -e " Configuring SO"
187 sudo route add -host $JUJU_CONTROLLER_IP gw $VCA_CONTAINER_IP
188 sudo sed -i "$ i route add -host $JUJU_CONTROLLER_IP gw $VCA_CONTAINER_IP" /etc/rc.local
189
190 # make journaling persistent
191 lxc exec SO-ub -- mkdir -p /var/log/journal
192 lxc exec SO-ub -- systemd-tmpfiles --create --prefix /var/log/journal
193 lxc exec SO-ub -- systemctl restart systemd-journald
194
195 echo RIFT_EXTERNAL_ADDRESS=$DEFAULT_IP | lxc exec SO-ub -- tee -a /usr/rift/etc/default/launchpad
196
197 lxc exec SO-ub -- systemctl restart launchpad
198
199 so_is_up $SO_CONTAINER_IP
200
201 #delete existing config agent (could be there on reconfigure)
202 curl -k --request DELETE \
203 --url https://$SO_CONTAINER_IP:8008/api/config/config-agent/account/osmjuju \
204 --header 'accept: application/vnd.yang.data+json' \
205 --header 'authorization: Basic YWRtaW46YWRtaW4=' \
206 --header 'cache-control: no-cache' \
207 --header 'content-type: application/vnd.yang.data+json' &> /dev/null
208
209 result=$(curl -k --request POST \
210 --url https://$SO_CONTAINER_IP:8008/api/config/config-agent \
211 --header 'accept: application/vnd.yang.data+json' \
212 --header 'authorization: Basic YWRtaW46YWRtaW4=' \
213 --header 'cache-control: no-cache' \
214 --header 'content-type: application/vnd.yang.data+json' \
215 --data '{"account": [ { "name": "osmjuju", "account-type": "juju", "juju": { "ip-address": "'$JUJU_CONTROLLER_IP'", "port": "17070", "user": "admin", "secret": "'$JUJU_PASSWD'" } } ]}')
216 [[ $result =~ .*success.* ]] || FATAL "Failed config-agent configuration: $result"
217
218 #R1/R2 config line
219 #result=$(curl -k --request PUT \
220 # --url https://$SO_CONTAINER_IP:8008/api/config/resource-orchestrator \
221 # --header 'accept: application/vnd.yang.data+json' \
222 # --header 'authorization: Basic YWRtaW46YWRtaW4=' \
223 # --header 'cache-control: no-cache' \
224 # --header 'content-type: application/vnd.yang.data+json' \
225 # --data '{ "openmano": { "host": "'$RO_CONTAINER_IP'", "port": "9090", "tenant-id": "'$RO_TENANT_ID'" }, "name": "osmopenmano", "account-type": "openmano" }')
226
227 result=$(curl -k --request PUT \
228 --url https://$SO_CONTAINER_IP:8008/api/config/project/default/ro-account/account \
229 --header 'accept: application/vnd.yang.data+json' \
230 --header 'authorization: Basic YWRtaW46YWRtaW4=' \
231 --header 'cache-control: no-cache' \
232 --header 'content-type: application/vnd.yang.data+json' \
233 --data '{"rw-ro-account:account": [ { "openmano": { "host": "'$RO_CONTAINER_IP'", "port": "9090", "tenant-id": "'$RO_TENANT_ID'"}, "name": "osmopenmano", "ro-account-type": "openmano" }]}')
234 [[ $result =~ .*success.* ]] || FATAL "Failed resource-orchestrator configuration: $result"
235
236 result=$(curl -k --request PATCH \
237 --url https://$SO_CONTAINER_IP:8008/v2/api/config/openidc-provider-config/rw-ui-client/redirect-uri \
238 --header 'accept: application/vnd.yang.data+json' \
239 --header 'authorization: Basic YWRtaW46YWRtaW4=' \
240 --header 'cache-control: no-cache' \
241 --header 'content-type: application/vnd.yang.data+json' \
242 --data '{"redirect-uri": "https://'$DEFAULT_IP':8443/callback" }')
243 [[ $result =~ .*success.* ]] || FATAL "Failed redirect-uri configuration: $result"
244
245 result=$(curl -k --request PATCH \
246 --url https://$SO_CONTAINER_IP:8008/v2/api/config/openidc-provider-config/rw-ui-client/post-logout-redirect-uri \
247 --header 'accept: application/vnd.yang.data+json' \
248 --header 'authorization: Basic YWRtaW46YWRtaW4=' \
249 --header 'cache-control: no-cache' \
250 --header 'content-type: application/vnd.yang.data+json' \
251 --data '{"post-logout-redirect-uri": "https://'$DEFAULT_IP':8443/?api_server=https://'$DEFAULT_IP'" }')
252 [[ $result =~ .*success.* ]] || FATAL "Failed post-logout-redirect-uri configuration: $result"
253
254 lxc exec SO-ub -- tee /etc/network/interfaces.d/60-rift.cfg <<EOF
255 auto lo:1
256 iface lo:1 inet static
257 address $DEFAULT_IP
258 netmask 255.255.255.255
259 EOF
260 lxc exec SO-ub ifup lo:1
261
262 }
263
264 function install_lxd() {
265 lxd init --auto
266 lxd waitready
267 systemctl stop lxd-bridge
268 systemctl --system daemon-reload
269 systemctl enable lxd-bridge
270 systemctl start lxd-bridge
271 }
272
273 function ask_user(){
274 # ask to the user and parse a response among 'y', 'yes', 'n' or 'no'. Case insensitive
275 # Params: $1 text to ask; $2 Action by default, can be 'y' for yes, 'n' for no, other or empty for not allowed
276 # Return: true(0) if user type 'yes'; false (1) if user type 'no'
277 read -e -p "$1" USER_CONFIRMATION
278 while true ; do
279 [ -z "$USER_CONFIRMATION" ] && [ "$2" == 'y' ] && return 0
280 [ -z "$USER_CONFIRMATION" ] && [ "$2" == 'n' ] && return 1
281 [ "${USER_CONFIRMATION,,}" == "yes" ] || [ "${USER_CONFIRMATION,,}" == "y" ] && return 0
282 [ "${USER_CONFIRMATION,,}" == "no" ] || [ "${USER_CONFIRMATION,,}" == "n" ] && return 1
283 read -e -p "Please type 'yes' or 'no': " USER_CONFIRMATION
284 done
285 }
286
287 UNINSTALL=""
288 DEVELOP=""
289 NAT=""
290 UPDATE=""
291 RECONFIGURE=""
292 TEST_INSTALLER=""
293 LXD=""
294 SHOWOPTS=""
295 COMMIT_ID=""
296 ASSUME_YES=""
297 INSTALL_FROM_SOURCE=""
298
299 while getopts ":hy-:b:r:k:u:R:" o; do
300 case "${o}" in
301 h)
302 usage && exit 0
303 ;;
304 b)
305 COMMIT_ID=${OPTARG}
306 ;;
307 r)
308 REPOSITORY="-r ${OPTARG}"
309 ;;
310 R)
311 RELEASE="-R ${OPTARG}"
312 ;;
313 k)
314 REPOSITORY_KEY="-k ${OPTARG}"
315 ;;
316 u)
317 REPOSITORY_BASE="-u ${OPTARG}"
318 ;;
319 -)
320 [ "${OPTARG}" == "help" ] && usage && exit 0
321 [ "${OPTARG}" == "source" ] && INSTALL_FROM_SOURCE="y" && continue
322 [ "${OPTARG}" == "develop" ] && DEVELOP="y" && continue
323 [ "${OPTARG}" == "uninstall" ] && UNINSTALL="y" && continue
324 [ "${OPTARG}" == "nat" ] && NAT="y" && continue
325 [ "${OPTARG}" == "update" ] && UPDATE="y" && continue
326 [ "${OPTARG}" == "reconfigure" ] && RECONFIGURE="y" && continue
327 [ "${OPTARG}" == "test" ] && TEST_INSTALLER="y" && continue
328 [ "${OPTARG}" == "lxd" ] && LXD="y" && continue
329 [ "${OPTARG}" == "showopts" ] && SHOWOPTS="y" && continue
330 echo -e "Invalid option: '--$OPTARG'\n" >&2
331 usage && exit 1
332 ;;
333 \?)
334 echo -e "Invalid option: '-$OPTARG'\n" >&2
335 usage && exit 1
336 ;;
337 y)
338 ASSUME_YES="y"
339 ;;
340 *)
341 usage && exit 1
342 ;;
343 esac
344 done
345
346 if [ -n "$SHOWOPTS" ]; then
347 echo "DEVELOP=$DEVELOP"
348 echo "INSTALL_FROM_SOURCE=$INSTALL_FROM_SOURCE"
349 echo "UNINSTALL=$UNINSTALL"
350 echo "NAT=$NAT"
351 echo "UPDATE=$UPDATE"
352 echo "RECONFIGURE=$RECONFIGURE"
353 echo "TEST_INSTALLER=$TEST_INSTALLER"
354 echo "LXD=$LXD"
355 echo "SHOWOPTS=$SHOWOPTS"
356 echo "Install from specific refspec (-b): $COMMIT_ID"
357 exit 0
358 fi
359
360 # if develop, we force master
361 [ -z "$COMMIT_ID" ] && [ -n "$DEVELOP" ] && COMMIT_ID="master"
362
363 # forcing source from master removed. Now only install from source when explicit
364 # [ -n "$COMMIT_ID" ] && [ "$COMMIT_ID" == "master" ] && INSTALL_FROM_SOURCE="y"
365
366 if [ -n "$TEST_INSTALLER" ]; then
367 echo -e "\nUsing local devops repo for OSM installation"
368 TEMPDIR="$(dirname $(realpath $(dirname $0)))"
369 else
370 echo -e "\nCreating temporary dir for OSM installation"
371 TEMPDIR="$(mktemp -d -q --tmpdir "installosm.XXXXXX")"
372 trap 'rm -rf "$TEMPDIR"' EXIT
373 fi
374
375 need_packages="git jq"
376 for package in $need_packages; do
377 echo -e "Checking required packages: $package"
378 dpkg -l $package &>/dev/null || ! echo -e " $package not installed.\nInstalling $package requires root privileges" || sudo apt-get install -y $package
379 done
380
381 if [ -z "$TEST_INSTALLER" ]; then
382 echo -e "\nCloning devops repo temporarily"
383 git clone https://osm.etsi.org/gerrit/osm/devops.git $TEMPDIR
384 RC_CLONE=$?
385 fi
386
387 echo -e "\nGuessing the current stable release"
388 LATEST_STABLE_DEVOPS=`git -C $TEMPDIR tag -l v[0-9].* | tail -n1`
389 [ -z "$COMMIT_ID" ] && [ -z "$LATEST_STABLE_DEVOPS" ] && echo "Could not find the current latest stable release" && exit 0
390 echo "Latest tag in devops repo: $LATEST_STABLE_DEVOPS"
391 [ -z "$COMMIT_ID" ] && [ -n "$LATEST_STABLE_DEVOPS" ] && COMMIT_ID="tags/$LATEST_STABLE_DEVOPS"
392 [ -z "$TEST_INSTALLER" ] && git -C $TEMPDIR checkout tags/$LATEST_STABLE_DEVOPS
393
394 OSM_DEVOPS=$TEMPDIR
395 OSM_JENKINS="$TEMPDIR/jenkins"
396 . $OSM_JENKINS/common/all_funcs
397
398 [ -n "$UNINSTALL" ] && uninstall && echo -e "\nDONE" && exit 0
399 [ -n "$NAT" ] && nat && echo -e "\nDONE" && exit 0
400 [ -n "$UPDATE" ] && update && echo -e "\nDONE" && exit 0
401 [ -n "$RECONFIGURE" ] && configure && echo -e "\nDONE" && exit 0
402
403 #Installation starts here
404 echo -e "\nInstalling OSM from refspec: $COMMIT_ID"
405 if [ -n "$INSTALL_FROM_SOURCE" ] && [ -z "$ASSUME_YES" ]; then
406 ! ask_user "The installation will take about 75-90 minutes. Continue (Y/n)? " y && echo "Cancelled!" && exit 1
407 fi
408
409 echo -e "\nChecking required packages: wget, curl, tar"
410 dpkg -l wget curl tar &>/dev/null || ! echo -e " One or several packages are not installed.\nInstalling required packages\n Root privileges are required" || sudo apt-get install -y wget curl tar
411
412 echo -e "Checking required packages: lxd"
413 lxd --version &>/dev/null || FATAL "lxd not present, exiting."
414 [ -n "$LXD" ] && echo -e "\nConfiguring lxd" && install_lxd
415
416 wget -q -O- https://osm-download.etsi.org/ftp/osm-3.0-three/README.txt &> /dev/null
417
418 # use local devops for containers
419 export OSM_USE_LOCAL_DEVOPS=true
420 if [ -z "$INSTALL_FROM_SOURCE" ]; then
421 echo -e "\nCreating the containers and installing from binaries ..."
422 $OSM_DEVOPS/jenkins/host/install RO $REPOSITORY $RELEASE $REPOSITORY_KEY $REPOSITORY_BASE || FATAL "RO install failed"
423 $OSM_DEVOPS/jenkins/host/start_build VCA || FATAL "VCA install failed"
424 $OSM_DEVOPS/jenkins/host/install SO $REPOSITORY $RELEASE $REPOSITORY_KEY $REPOSITORY_BASE || FATAL "SO install failed"
425 $OSM_DEVOPS/jenkins/host/install UI $REPOSITORY $RELEASE $REPOSITORY_KEY $REPOSITORY_BASE || FATAL "UI install failed"
426 else #install from source
427 echo -e "\nCreating the containers and building from source ..."
428 $OSM_DEVOPS/jenkins/host/start_build RO --notest checkout $COMMIT_ID || FATAL "RO container build failed (refspec: '$COMMIT_ID')"
429 $OSM_DEVOPS/jenkins/host/start_build VCA || FATAL "VCA container build failed"
430 $OSM_DEVOPS/jenkins/host/start_build SO checkout $COMMIT_ID || FATAL "SO container build failed (refspec: '$COMMIT_ID')"
431 $OSM_DEVOPS/jenkins/host/start_build UI checkout $COMMIT_ID || FATAL "UI container build failed (refspec: '$COMMIT_ID')"
432 fi
433
434 #Install iptables-persistent and configure NAT rules
435 nat
436
437 #Configure components
438 configure
439
440 wget -q -O- https://osm-download.etsi.org/ftp/osm-3.0-three/README2.txt &> /dev/null
441 echo -e "\nDONE"