Deprecate use of sites/raw for vnf HEAT templates
[demo.git] / vnfs / vCPE / scripts / v_gmux_install.sh
1 #!/bin/bash
2
3 REPO_URL_ARTIFACTS=$(cat /opt/config/repo_url_artifacts.txt)
4 DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt)
5 INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt)
6 VPP_SOURCE_REPO_URL=$(cat /opt/config/vpp_source_repo_url.txt)
7 VPP_SOURCE_REPO_RELEASE_TAG=$(cat /opt/config/vpp_source_repo_release_tag.txt)
8 VPP_PATCH_URL=$(cat /opt/config/vpp_patch_url.txt)
9 HC2VPP_SOURCE_REPO_URL=$(cat /opt/config/hc2vpp_source_repo_url.txt)
10 HC2VPP_SOURCE_REPO_RELEASE_TAG=$(cat /opt/config/hc2vpp_source_repo_release_tag.txt)
11 HC2VPP_PATCH_URL=$(cat /opt/config/hc2vpp_patch_url.txt)
12 LIBEVEL_PATCH_URL=$(cat /opt/config/libevel_patch_url.txt)
13 CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
14 MUX_GW_IP=$(cat /opt/config/mux_gw_net_ipaddr.txt)
15 MUX_GW_CIDR=$(cat /opt/config/mux_gw_net_cidr.txt)
16 MUX_TO_BNG_IP=$(cat /opt/config/mux_to_bng_net_ipaddr.txt)
17 BNG_MUX_CIDR=$(cat /opt/config/bng_mux_net_cidr.txt)
18 BRG_BNG_CIDR=$(cat /opt/config/brg_bng_net_cidr.txt)
19 BNG_TO_MUX_IP=$(cat /opt/config/bng_to_mux_net_ipaddr.txt)
20
21 # Build states are:
22 # 'build' - just build the code
23 # 'done' - code is build, install and setup
24 # 'auto' - bulid, install and setup
25 BUILD_STATE="auto"
26 if [[ -f /opt/config/compile_state.txt ]]
27 then
28     BUILD_STATE=$(cat /opt/config/compile_state.txt)
29 fi
30
31 # Convert Network CIDR to Netmask
32 cdr2mask () {
33         # Number of args to shift, 255..255, first non-255 byte, zeroes
34         set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
35         [ $1 -gt 1 ] && shift $1 || shift
36         echo ${1-0}.${2-0}.${3-0}.${4-0}
37 }
38
39 # OpenStack network configuration
40 if [[ $BUILD_STATE != "build" ]]
41 then
42     if [[ $CLOUD_ENV == "openstack" ]]
43     then
44         echo 127.0.0.1 $(hostname) >> /etc/hosts
45
46         # Allow remote login as root
47         mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
48         cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
49
50         MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
51
52         IP=$(cat /opt/config/oam_ipaddr.txt)
53         BITS=$(cat /opt/config/oam_cidr.txt | cut -d"/" -f2)
54         NETMASK=$(cdr2mask $BITS)
55         echo "auto eth2" >> /etc/network/interfaces
56         echo "iface eth2 inet static" >> /etc/network/interfaces
57         echo "    address $IP" >> /etc/network/interfaces
58         echo "    netmask $NETMASK" >> /etc/network/interfaces
59         echo "    mtu $MTU" >> /etc/network/interfaces
60
61         ifup eth2
62     fi
63 fi  # endif BUILD_STATE != "build"
64
65 if [[ $BUILD_STATE != "done" ]]
66 then
67     # Download required dependencies
68     echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >>  /etc/apt/sources.list.d/java.list
69     echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >>  /etc/apt/sources.list.d/java.list
70     apt-get update
71     apt-get install --allow-unauthenticated -y wget openjdk-8-jdk apt-transport-https ca-certificates g++ libcurl4-gnutls-dev
72     sleep 1
73
74     # Install the tools required for download codes
75     apt-get install -y expect git patch make linux-image-extra-`uname -r`
76
77     #Download and build the VPP codes
78     cd /opt
79     git clone ${VPP_SOURCE_REPO_URL} -b ${VPP_SOURCE_REPO_RELEASE_TAG} vpp
80     wget -O Vpp-Add-VES-agent-for-vG-MUX.patch ${VPP_PATCH_URL} 
81
82     cd vpp
83     patch -p1 < ../Vpp-Add-VES-agent-for-vG-MUX.patch
84     expect -c "
85             spawn make install-dep;
86             expect {
87                     \"Do you want to continue?*\" {send \"Y\r\"; interact}
88             }
89     "
90
91     # Install the evel-library first since we need the lib
92     cd /opt
93     apt-get install -y libcurl4-openssl-dev
94     git clone http://gerrit.onap.org/r/demo
95     wget -O vCPE-vG-MUX-libevel-fixup.patch ${LIBEVEL_PATCH_URL} 
96     cd demo
97     patch -p1 < ../vCPE-vG-MUX-libevel-fixup.patch
98     cd vnfs/VES5.0/evel/evel-library/bldjobs 
99     make
100     cp ../libs/x86_64/libevel.so /usr/lib
101     ldconfig
102
103     cd /opt/vpp/build-root
104     ./bootstrap.sh
105     make V=0 PLATFORM=vpp TAG=vpp install-deb
106
107     # Install the VPP package
108     apt install -y python-ply-lex-3.5 python-ply-yacc-3.5 python-pycparser python-cffi
109     dpkg -i *.deb
110     systemctl stop vpp
111 fi  # endif BUILD_STATE != "done"
112
113 if [[ $BUILD_STATE != "build" ]]
114 then
115     # Auto-start configuration for the VPP
116     cat > /etc/vpp/startup.conf << EOF
117
118 unix {
119   nodaemon
120   log /tmp/vpp.log
121   full-coredump
122   cli-listen localhost:5002
123   startup-config /etc/vpp/setup.gate
124 }
125
126 api-trace {
127   on
128 }
129
130 api-segment {
131   gid vpp
132 }
133
134 cpu {
135         ## In the VPP there is one main thread and optionally the user can create worker(s)
136         ## The main thread and worker thread(s) can be pinned to CPU core(s) manually or automatically
137
138         ## Manual pinning of thread(s) to CPU core(s)
139
140         ## Set logical CPU core where main thread runs
141         # main-core 1
142
143         ## Set logical CPU core(s) where worker threads are running
144         # corelist-workers 2-3,18-19
145
146         ## Automatic pinning of thread(s) to CPU core(s)
147
148         ## Sets number of CPU core(s) to be skipped (1 ... N-1)
149         ## Skipped CPU core(s) are not used for pinning main thread and working thread(s).
150         ## The main thread is automatically pinned to the first available CPU core and worker(s)
151         ## are pinned to next free CPU core(s) after core assigned to main thread
152         # skip-cores 4
153
154         ## Specify a number of workers to be created
155         ## Workers are pinned to N consecutive CPU cores while skipping "skip-cores" CPU core(s)
156         ## and main thread's CPU core
157         # workers 2
158
159         ## Set scheduling policy and priority of main and worker threads
160
161         ## Scheduling policy options are: other (SCHED_OTHER), batch (SCHED_BATCH)
162         ## idle (SCHED_IDLE), fifo (SCHED_FIFO), rr (SCHED_RR)
163         # scheduler-policy fifo
164
165         ## Scheduling priority is used only for "real-time policies (fifo and rr),
166         ## and has to be in the range of priorities supported for a particular policy
167         # scheduler-priority 50
168 }
169
170 # dpdk {
171         ## Change default settings for all intefaces
172         # dev default {
173                 ## Number of receive queues, enables RSS
174                 ## Default is 1
175                 # num-rx-queues 3
176
177                 ## Number of transmit queues, Default is equal
178                 ## to number of worker threads or 1 if no workers treads
179                 # num-tx-queues 3
180
181                 ## Number of descriptors in transmit and receive rings
182                 ## increasing or reducing number can impact performance
183                 ## Default is 1024 for both rx and tx
184                 # num-rx-desc 512
185                 # num-tx-desc 512
186
187                 ## VLAN strip offload mode for interface
188                 ## Default is off
189                 # vlan-strip-offload on
190         # }
191
192         ## Whitelist specific interface by specifying PCI address
193         # dev 0000:02:00.0
194
195         ## Whitelist specific interface by specifying PCI address and in
196         ## addition specify custom parameters for this interface
197         # dev 0000:02:00.1 {
198         #       num-rx-queues 2
199         # }
200
201         ## Change UIO driver used by VPP, Options are: igb_uio, vfio-pci
202         ## and uio_pci_generic (default)
203         # uio-driver vfio-pci
204
205         ## Disable mutli-segment buffers, improves performance but
206         ## disables Jumbo MTU support
207         # no-multi-seg
208
209         ## Increase number of buffers allocated, needed only in scenarios with
210         ## large number of interfaces and worker threads. Value is per CPU socket.
211         ## Default is 16384
212         # num-mbufs 128000
213
214         ## Change hugepages allocation per-socket, needed only if there is need for
215         ## larger number of mbufs. Default is 256M on each detected CPU socket
216         # socket-mem 2048,2048
217 # }
218
219 EOF
220
221     # Get list of network device PCI bus addresses
222     get_nic_pci_list() {
223         while read -r line ; do
224             if [ "$line" != "${line#*network device}" ]; then
225                 echo -n "${line%% *} "
226             fi
227         done < <(lspci)
228     }
229
230     NICS=$(get_nic_pci_list)
231     NICS=`echo ${NICS} | sed 's/[0]\+\([0-9]\)/\1/g' | sed 's/[.:]/\//g'`
232
233     BNG_MUX_NIC=GigabitEthernet`echo ${NICS} | cut -d " " -f 2`  # second interface in list
234     MUX_GW_NIC=GigabitEthernet`echo ${NICS} | cut -d " " -f 4`   # fourth interface in list
235
236     cat > /etc/vpp/setup.gate << EOF
237 set int state ${BNG_MUX_NIC} up
238 set int ip address ${BNG_MUX_NIC} ${MUX_TO_BNG_IP}/${BNG_MUX_CIDR#*/}
239
240 set int state ${MUX_GW_NIC} up
241 set int ip address ${MUX_GW_NIC} ${MUX_GW_IP}/${MUX_GW_CIDR#*/}
242 ip route add ${BRG_BNG_CIDR} via ${BNG_TO_MUX_IP} ${BNG_MUX_NIC}
243 EOF
244
245 fi  # endif BUILD_STATE != "build"
246
247 if [[ $BUILD_STATE != "done" ]]
248 then
249     # Download and install HC2VPP from source
250     cd /opt
251     git clone ${HC2VPP_SOURCE_REPO_URL} -b ${HC2VPP_SOURCE_REPO_RELEASE_TAG} hc2vpp
252     wget -O Hc2vpp-Add-VES-agent-for-vG-MUX.patch ${HC2VPP_PATCH_URL}
253
254     apt-get install -y maven
255     mkdir -p ~/.m2
256     cat > ~/.m2/settings.xml << EOF
257 <?xml version="1.0" encoding="UTF-8"?>
258 <!-- vi: set et smarttab sw=2 tabstop=2: -->
259 <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
260   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
261   xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
262
263   <profiles>
264     <profile>
265       <id>fd.io-release</id>
266       <repositories>
267         <repository>
268           <id>fd.io-mirror</id>
269           <name>fd.io-mirror</name>
270           <url>https://nexus.fd.io/content/groups/public/</url>
271           <releases>
272             <enabled>true</enabled>
273             <updatePolicy>never</updatePolicy>
274           </releases>
275           <snapshots>
276             <enabled>false</enabled>
277           </snapshots>
278         </repository>
279       </repositories>
280       <pluginRepositories>
281         <pluginRepository>
282           <id>fd.io-mirror</id>
283           <name>fd.io-mirror</name>
284           <url>https://nexus.fd.io/content/repositories/public/</url>
285           <releases>
286             <enabled>true</enabled>
287             <updatePolicy>never</updatePolicy>
288           </releases>
289           <snapshots>
290             <enabled>false</enabled>
291           </snapshots>
292         </pluginRepository>
293       </pluginRepositories>
294     </profile>
295
296     <profile>
297       <id>fd.io-snapshots</id>
298       <repositories>
299         <repository>
300           <id>fd.io-snapshot</id>
301           <name>fd.io-snapshot</name>
302           <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
303           <releases>
304             <enabled>false</enabled>
305           </releases>
306           <snapshots>
307             <enabled>true</enabled>
308           </snapshots>
309         </repository>
310       </repositories>
311       <pluginRepositories>
312         <pluginRepository>
313           <id>fd.io-snapshot</id>
314           <name>fd.io-snapshot</name>
315           <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
316           <releases>
317             <enabled>false</enabled>
318           </releases>
319           <snapshots>
320             <enabled>true</enabled>
321           </snapshots>
322         </pluginRepository>
323       </pluginRepositories>
324     </profile>
325     <profile>
326       <id>opendaylight-snapshots</id>
327       <repositories>
328         <repository>
329           <id>opendaylight-snapshot</id>
330           <name>opendaylight-snapshot</name>
331           <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
332           <releases>
333             <enabled>false</enabled>
334           </releases>
335           <snapshots>
336             <enabled>true</enabled>
337           </snapshots>
338         </repository>
339       </repositories>
340       <pluginRepositories>
341         <pluginRepository>
342           <id>opendaylight-shapshot</id>
343           <name>opendaylight-snapshot</name>
344           <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
345           <releases>
346             <enabled>false</enabled>
347           </releases>
348           <snapshots>
349             <enabled>true</enabled>
350           </snapshots>
351         </pluginRepository>
352       </pluginRepositories>
353     </profile>
354   </profiles>
355
356   <activeProfiles>
357     <activeProfile>fd.io-release</activeProfile>
358     <activeProfile>fd.io-snapshots</activeProfile>
359     <activeProfile>opendaylight-snapshots</activeProfile>
360   </activeProfiles>
361 </settings>
362 EOF
363
364     cd hc2vpp
365     patch -p1 < ../Hc2vpp-Add-VES-agent-for-vG-MUX.patch
366     p_version_snap=$(cat ves/ves-impl/pom.xml | grep -A 1 "jvpp-ves" | tail -1)
367     p_version_snap=$(echo "${p_version_snap%<*}")
368     p_version_snap=$(echo "${p_version_snap#*>}")
369     p_version=$(echo "${p_version_snap%-*}")
370     mkdir -p  ~/.m2/repository/io/fd/vpp/jvpp-ves/${p_version_snap}
371     mvn install:install-file -Dfile=/usr/share/java/jvpp-ves-${p_version}.jar -DgroupId=io.fd.vpp -DartifactId=jvpp-ves -Dversion=${p_version_snap} -Dpackaging=jar
372     mvn clean install -nsu -DskipTests=true
373     l_version=$(cat pom.xml | grep "<version>" | head -1)
374     l_version=$(echo "${l_version%<*}")
375     l_version=$(echo "${l_version#*>}")
376     mv vpp-integration/minimal-distribution/target/vpp-integration-distribution-${l_version}-hc/vpp-integration-distribution-${l_version} /opt/honeycomb
377     sed -i 's/127.0.0.1/0.0.0.0/g' /opt/honeycomb/config/honeycomb.json
378
379     # Disable automatic upgrades
380     if [[ $CLOUD_ENV != "rackspace" ]]
381     then
382         echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
383         sed -i 's/\(APT::Periodic::Unattended-Upgrade\) "1"/\1 "0"/' /etc/apt/apt.conf.d/20auto-upgrades
384     fi
385 fi  # endif BUILD_STATE != "done"
386
387 if [[ $BUILD_STATE != "build" ]]
388 then
389     # Create systemctl service for Honeycomb
390     cat > /etc/systemd/system/honeycomb.service << EOF
391 [Unit]
392 Description=Honeycomb Agent for the VPP control plane
393 Documentation=https://wiki.fd.io/view/Honeycomb
394 Requires=vpp.service
395 After=vpp.service
396
397 [Service]
398 ExecStart=/opt/honeycomb/honeycomb
399 ExecStop=/opt/reset_ves_mode.sh
400 Restart=always
401 RestartSec=10
402
403 [Install]
404 WantedBy=multi-user.target
405 EOF
406     systemctl enable /etc/systemd/system/honeycomb.service
407
408     # Create script that is used to reset the ves mode configuration
409     # when the honeycomb service is stopped
410     cat > /opt/reset_ves_mode.sh << EOF
411 #!/bin/bash
412 mode_data=\$(curl -X GET -u admin:admin http://127.0.0.1:8183/restconf/config/vesagent:vesagent/mode 2>/dev/null | sed s/\"base-packet-loss\":[0-9]\*,/\"base-packet-loss\":0,/)
413 if [[ "\${mode_data}" != "" ]]
414 then
415     curl -X DELETE -u admin:admin http://127.0.0.1:8183/restconf/config/vesagent:vesagent/mode
416     curl -H "Content-Type:application/json" --data "\${mode_data}" -X POST -u admin:admin http://127.0.0.1:8183/restconf/config/vesagent:vesagent
417 fi
418 EOF
419     chmod a+x /opt/reset_ves_mode.sh
420
421     #Create a systemd service for auto-save
422     cat > /usr/bin/save_config << EOF
423 #!/bin/bash
424
425 #########################################################################
426 #
427 #  Copyright (c) 2017 Intel and/or its affiliates.
428
429 #  Licensed under the Apache License, Version 2.0 (the "License");
430 #  you may not use this file except in compliance with the License.
431 #  You may obtain a copy of the License at:
432
433 #      http://www.apache.org/licenses/LICENSE-2.0
434
435 #  Unless required by applicable law or agreed to in writing, software
436 #  distributed under the License is distributed on an "AS IS" BASIS,
437 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
438 #  See the License for the specific language governing permissions and
439 #  limitations under the License.
440 #
441 ##########################################################################
442
443 ############################### Variables ################################
444 VPP_SETUP_GATE=/etc/vpp/setup.gate
445
446 ############################### Functions ################################
447
448 # Write the commands to the startup scripts.
449 #
450 # We could set VPP configuration to the startup.conf.
451 # Write the configuration to the startup scripts so we could
452 # restore the system after rebooting.
453 #
454 write_startup_scripts()
455 {
456         local cmd=\${2}
457         local is_add=\${1}
458
459         if [[ \${is_add} == add ]] ;then
460                 while read -r line
461                 do
462                         if [[ \${line} == \${cmd} ]] ;then
463                                 return 0
464                         fi
465                 done < \${VPP_SETUP_GATE}
466
467                 echo "\${cmd}" >> \${VPP_SETUP_GATE}
468         else
469                 while read -r line
470                 do
471                         if [[ \${line} == \${cmd} ]] ;then
472                                 sed -i "/\${line}/d" \${VPP_SETUP_GATE}
473                                 return 0
474                         fi
475                 done < \${VPP_SETUP_GATE}
476         fi
477 }
478
479 # Save the VxLAN Tunnel Configuration to the startup script.
480 #
481 # Get the current VxLAN tunnel configuration with bash command:
482 # \$vppctl show vxlan tunnel
483 #  [0] src 10.3.0.2 dst 10.1.0.20 vni 100 sw_if_index 1 encap_fib_index 0 fib_entry_index 7 decap_next l2
484 #  [1] src 10.5.0.20 dst 10.5.0.21 vni 100 sw_if_index 2 encap_fib_index 0 fib_entry_index 8 decap_next l2
485 # Set the VxLAN Tunnel with the bash command:
486 # \$vppctl create vxlan tunnel src 10.3.0.2 dst 10.1.0.20 vni 100
487 # vxlan_tunnel0
488 save_vxlan_tunnel()
489 {
490         local src=""
491         local dst=""
492         local vni=""
493
494         vppctl show vxlan tunnel | while read line
495         do
496                 if [ "\${line}" != "" ] ;then
497                         src=\`echo \${line} | awk '{ print \$3 }'\`
498                         dst=\`echo \${line} | awk '{ print \$5 }'\`
499                         vni=\`echo \${line} | awk '{ print \$7 }'\`
500
501                         write_startup_scripts add "create vxlan tunnel src \${src} dst \${dst} vni \${vni}"
502                 fi
503         done
504 }
505
506 # Save the VxLAN tunnel L2 xconnect configuration to the startup script.
507 #
508 # Get the Current L2 Address configuration with bash command:
509 # \$vppctl show int addr
510 # local0 (dn):
511 # vxlan_tunnel0 (up):
512 #   l2 xconnect vxlan_tunnel1
513 # vxlan_tunnel1 (up):
514 #   l2 xconnect vxlan_tunnel0
515 # Save the VxLAN tunnel L2 xconnect configuration with bash command:
516 # \$vppctl set interface l2 xconnect vxlan_tunnel0 vxlan_tunnel1
517 #
518 save_vxlan_xconnect()
519 {
520         local ingress=""
521         local egress=""
522
523         vppctl show int addr | while read line
524         do
525                 if [[ \${line} == vxlan_tunnel* ]] ;then
526                         read next
527                         while [[ \${next} != l2* ]] || [[ \${next} == "" ]]
528                         do
529                                 line=\`echo \${next}\`
530                                 read next
531                         done
532                         if [[ \${next} == l2* ]] ;then
533                                 ingress=\`echo \${line} | awk '{ print \$1 }'\`
534                                 egress=\`echo \${next} | awk '{ print \$3 }'\`
535                                 write_startup_scripts add "set interface l2 xconnect \${ingress} \${egress}"
536                         fi
537                 fi
538         done
539 }
540
541 ################################# MAIN ###################################
542
543 save_vxlan_tunnel
544
545 save_vxlan_xconnect
546
547 EOF
548     chmod a+x /usr/bin/save_config
549     cat > /etc/systemd/system/autosave.service << EOF
550 [Unit]
551 Description=Run Scripts at Start and Stop
552 Requires=vpp.service
553 After=vpp.service
554
555 [Service]
556 Type=oneshot
557 RemainAfterExit=true
558 ExecStop=/usr/bin/save_config
559
560 [Install]
561 WantedBy=multi-user.target
562 EOF
563     systemctl enable /etc/systemd/system/autosave.service
564
565     # Download DHCP config files
566     cd /opt
567     unzip -p -j /opt/vcpe-scripts-$INSTALL_SCRIPT_VERSION.zip v_gmux_init.sh > /opt/v_gmux_init.sh
568     unzip -p -j /opt/vcpe-scripts-$INSTALL_SCRIPT_VERSION.zip v_gmux.sh > /opt/v_gmux.sh
569     chmod +x v_gmux_init.sh
570     chmod +x v_gmux.sh
571     mv v_gmux.sh /etc/init.d
572     update-rc.d v_gmux.sh defaults
573
574     # Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes
575     if [[ $CLOUD_ENV != "rackspace" ]]
576     then
577         sed -i "s/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub
578         grub-mkconfig -o /boot/grub/grub.cfg
579         sed -i "s/ens[0-9]*/eth0/g" /etc/network/interfaces.d/*.cfg
580         sed -i "s/ens[0-9]*/eth0/g" /etc/udev/rules.d/70-persistent-net.rules
581         echo 'network: {config: disabled}' >> /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
582         reboot
583     fi
584
585     ./v_gmux_init.sh
586 fi  # endif BUILD_STATE != "build"