|
|
@ -527,122 +527,124 @@ end |
|
|
|
</node> |
|
|
|
<node name="server-1" type="SIMPLE" subtype="server" location="251,336"> |
|
|
|
<extensions> |
|
|
|
<entry key="config" type="String">#cloud-config |
|
|
|
bootcmd: |
|
|
|
- ln -s -t /etc/rc.d /etc/rc.local |
|
|
|
hostname: server-1 |
|
|
|
manage_etc_hosts: true |
|
|
|
runcmd: |
|
|
|
- start ttyS0 |
|
|
|
- systemctl start getty@ttyS0.service |
|
|
|
- systemctl start rc-local |
|
|
|
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config |
|
|
|
- echo "UseDNS no" >> /etc/ssh/sshd_config |
|
|
|
- service ssh restart |
|
|
|
- service sshd restart |
|
|
|
users: |
|
|
|
- default |
|
|
|
- gecos: User configured by VIRL Configuration Engine 0.18.9 |
|
|
|
lock-passwd: false |
|
|
|
name: cisco |
|
|
|
plain-text-passwd: cisco |
|
|
|
shell: /bin/bash |
|
|
|
ssh-authorized-keys: |
|
|
|
- VIRL-USER-SSH-PUBLIC-KEY |
|
|
|
sudo: ALL=(ALL) ALL |
|
|
|
write_files: |
|
|
|
- path: /etc/init/ttyS0.conf |
|
|
|
owner: root:root |
|
|
|
content: | |
|
|
|
# ttyS0 - getty |
|
|
|
# This service maintains a getty on ttyS0 from the point the system is |
|
|
|
# started until it is shut down again. |
|
|
|
start on stopped rc or RUNLEVEL=[12345] |
|
|
|
stop on runlevel [!12345] |
|
|
|
respawn |
|
|
|
exec /sbin/getty -L 115200 ttyS0 vt102 |
|
|
|
permissions: '0644' |
|
|
|
- path: /etc/systemd/system/dhclient@.service |
|
|
|
content: | |
|
|
|
[Unit] |
|
|
|
Description=Run dhclient on %i interface |
|
|
|
After=network.target |
|
|
|
[Service] |
|
|
|
Type=oneshot |
|
|
|
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease |
|
|
|
RemainAfterExit=yes |
|
|
|
owner: root:root |
|
|
|
permissions: '0644' |
|
|
|
- path: /etc/rc.local |
|
|
|
owner: root:root |
|
|
|
permissions: '0755' |
|
|
|
content: |- |
|
|
|
#!/bin/sh -e |
|
|
|
ifconfig eth1 up 10.0.0.2 netmask 255.255.0.0 |
|
|
|
route add -host 192.168.0.1 gw 10.0.0.1 dev eth1 |
|
|
|
route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1 |
|
|
|
exit 0 |
|
|
|
<entry key="config" type="String">#cloud-config
 |
|
|
|
bootcmd:
 |
|
|
|
- ln -s -t /etc/rc.d /etc/rc.local
 |
|
|
|
hostname: server-1
 |
|
|
|
manage_etc_hosts: true
 |
|
|
|
runcmd:
 |
|
|
|
- start ttyS0
 |
|
|
|
- systemctl start getty@ttyS0.service
 |
|
|
|
- systemctl start rc-local
 |
|
|
|
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
 |
|
|
|
- echo "UseDNS no" >> /etc/ssh/sshd_config
 |
|
|
|
- service ssh restart
 |
|
|
|
- service sshd restart
 |
|
|
|
users:
 |
|
|
|
- default
 |
|
|
|
- gecos: User configured by VIRL Configuration Engine 0.18.9
 |
|
|
|
lock-passwd: false
 |
|
|
|
name: cisco
 |
|
|
|
plain-text-passwd: cisco
 |
|
|
|
shell: /bin/bash
 |
|
|
|
ssh-authorized-keys:
 |
|
|
|
- VIRL-USER-SSH-PUBLIC-KEY
 |
|
|
|
sudo: ALL=(ALL) ALL
 |
|
|
|
write_files:
 |
|
|
|
- path: /etc/init/ttyS0.conf
 |
|
|
|
owner: root:root
 |
|
|
|
content: |
 |
|
|
|
# ttyS0 - getty
 |
|
|
|
# This service maintains a getty on ttyS0 from the point the system is
 |
|
|
|
# started until it is shut down again.
 |
|
|
|
start on stopped rc or RUNLEVEL=[12345]
 |
|
|
|
stop on runlevel [!12345]
 |
|
|
|
respawn
 |
|
|
|
exec /sbin/getty -L 115200 ttyS0 vt102
 |
|
|
|
permissions: '0644'
 |
|
|
|
- path: /etc/systemd/system/dhclient@.service
 |
|
|
|
content: |
 |
|
|
|
[Unit]
 |
|
|
|
Description=Run dhclient on %i interface
 |
|
|
|
After=network.target
 |
|
|
|
[Service]
 |
|
|
|
Type=oneshot
 |
|
|
|
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
 |
|
|
|
RemainAfterExit=yes
 |
|
|
|
owner: root:root
 |
|
|
|
permissions: '0644'
 |
|
|
|
- path: /etc/rc.local
 |
|
|
|
owner: root:root
 |
|
|
|
permissions: '0755'
 |
|
|
|
content: |-
 |
|
|
|
#!/bin/sh -e
 |
|
|
|
ifconfig eth1 up 10.0.0.2 netmask 255.255.0.0
 |
|
|
|
route add -host 192.168.0.1 gw 10.0.0.1 dev eth1
 |
|
|
|
route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1
 |
|
|
|
route add default gw 10.0.0.1
 |
|
|
|
exit 0
 |
|
|
|
</entry> |
|
|
|
</extensions> |
|
|
|
<interface id="0" name="eth1" ipv4="10.0.0.2" netPrefixLenV4="16"/> |
|
|
|
</node> |
|
|
|
<node name="server-2" type="SIMPLE" subtype="server" location="517,336"> |
|
|
|
<extensions> |
|
|
|
<entry key="config" type="String">#cloud-config |
|
|
|
bootcmd: |
|
|
|
- ln -s -t /etc/rc.d /etc/rc.local |
|
|
|
hostname: server-2 |
|
|
|
manage_etc_hosts: true |
|
|
|
runcmd: |
|
|
|
- start ttyS0 |
|
|
|
- systemctl start getty@ttyS0.service |
|
|
|
- systemctl start rc-local |
|
|
|
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config |
|
|
|
- echo "UseDNS no" >> /etc/ssh/sshd_config |
|
|
|
- service ssh restart |
|
|
|
- service sshd restart |
|
|
|
users: |
|
|
|
- default |
|
|
|
- gecos: User configured by VIRL Configuration Engine 0.18.9 |
|
|
|
lock-passwd: false |
|
|
|
name: cisco |
|
|
|
plain-text-passwd: cisco |
|
|
|
shell: /bin/bash |
|
|
|
ssh-authorized-keys: |
|
|
|
- VIRL-USER-SSH-PUBLIC-KEY |
|
|
|
sudo: ALL=(ALL) ALL |
|
|
|
write_files: |
|
|
|
- path: /etc/init/ttyS0.conf |
|
|
|
owner: root:root |
|
|
|
content: | |
|
|
|
# ttyS0 - getty |
|
|
|
# This service maintains a getty on ttyS0 from the point the system is |
|
|
|
# started until it is shut down again. |
|
|
|
start on stopped rc or RUNLEVEL=[12345] |
|
|
|
stop on runlevel [!12345] |
|
|
|
respawn |
|
|
|
exec /sbin/getty -L 115200 ttyS0 vt102 |
|
|
|
permissions: '0644' |
|
|
|
- path: /etc/systemd/system/dhclient@.service |
|
|
|
content: | |
|
|
|
[Unit] |
|
|
|
Description=Run dhclient on %i interface |
|
|
|
After=network.target |
|
|
|
[Service] |
|
|
|
Type=oneshot |
|
|
|
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease |
|
|
|
RemainAfterExit=yes |
|
|
|
owner: root:root |
|
|
|
permissions: '0644' |
|
|
|
- path: /etc/rc.local |
|
|
|
owner: root:root |
|
|
|
permissions: '0755' |
|
|
|
content: |- |
|
|
|
#!/bin/sh -e |
|
|
|
ifconfig eth1 up 10.0.0.3 netmask 255.255.0.0 |
|
|
|
route add -host 192.168.0.1 gw 10.0.0.1 dev eth1 |
|
|
|
route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1 |
|
|
|
exit 0 |
|
|
|
<entry key="config" type="String">#cloud-config
 |
|
|
|
bootcmd:
 |
|
|
|
- ln -s -t /etc/rc.d /etc/rc.local
 |
|
|
|
hostname: server-2
 |
|
|
|
manage_etc_hosts: true
 |
|
|
|
runcmd:
 |
|
|
|
- start ttyS0
 |
|
|
|
- systemctl start getty@ttyS0.service
 |
|
|
|
- systemctl start rc-local
 |
|
|
|
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
 |
|
|
|
- echo "UseDNS no" >> /etc/ssh/sshd_config
 |
|
|
|
- service ssh restart
 |
|
|
|
- service sshd restart
 |
|
|
|
users:
 |
|
|
|
- default
 |
|
|
|
- gecos: User configured by VIRL Configuration Engine 0.18.9
 |
|
|
|
lock-passwd: false
 |
|
|
|
name: cisco
 |
|
|
|
plain-text-passwd: cisco
 |
|
|
|
shell: /bin/bash
 |
|
|
|
ssh-authorized-keys:
 |
|
|
|
- VIRL-USER-SSH-PUBLIC-KEY
 |
|
|
|
sudo: ALL=(ALL) ALL
 |
|
|
|
write_files:
 |
|
|
|
- path: /etc/init/ttyS0.conf
 |
|
|
|
owner: root:root
 |
|
|
|
content: |
 |
|
|
|
# ttyS0 - getty
 |
|
|
|
# This service maintains a getty on ttyS0 from the point the system is
 |
|
|
|
# started until it is shut down again.
 |
|
|
|
start on stopped rc or RUNLEVEL=[12345]
 |
|
|
|
stop on runlevel [!12345]
 |
|
|
|
respawn
 |
|
|
|
exec /sbin/getty -L 115200 ttyS0 vt102
 |
|
|
|
permissions: '0644'
 |
|
|
|
- path: /etc/systemd/system/dhclient@.service
 |
|
|
|
content: |
 |
|
|
|
[Unit]
 |
|
|
|
Description=Run dhclient on %i interface
 |
|
|
|
After=network.target
 |
|
|
|
[Service]
 |
|
|
|
Type=oneshot
 |
|
|
|
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
 |
|
|
|
RemainAfterExit=yes
 |
|
|
|
owner: root:root
 |
|
|
|
permissions: '0644'
 |
|
|
|
- path: /etc/rc.local
 |
|
|
|
owner: root:root
 |
|
|
|
permissions: '0755'
 |
|
|
|
content: |-
 |
|
|
|
#!/bin/sh -e
 |
|
|
|
ifconfig eth1 up 10.0.0.3 netmask 255.255.0.0
 |
|
|
|
route add -host 192.168.0.1 gw 10.0.0.1 dev eth1
 |
|
|
|
route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1
 |
|
|
|
route add default gw 10.0.0.1
 |
|
|
|
exit 0
 |
|
|
|
</entry> |
|
|
|
</extensions> |
|
|
|
<interface id="0" name="eth1" ipv4="10.0.0.3" netPrefixLenV4="16"/> |
|
|
|