Commit 67cbc2a4 authored by Mark Beierl's avatar Mark Beierl
Browse files

Updates



Added logging, creation of subnets, improved cleanup
Signed-off-by: Mark Beierl's avatarMark Beierl <mark.beierl@canonical.com>
parent f68153bd
Pipeline #7497 failed with stage
in 1 minute and 49 seconds
#!/bin/bash
echo $0 started at $(date)
sudo sed -i "s/127.0.0.1 /127.0.0.1 $HOSTNAME /" /etc/hosts
echo 'ubuntu:hackfest'| sudo chpasswd
sudo sed -i "s/^PasswordAuthentication.*/PasswordAuthentication yes/" /etc/ssh/sshd_config
sudo service ssh restart
echo "Acquire::http::Proxy \"http://172.21.1.1:3142\";" | sudo tee /etc/apt/apt.conf.d/proxy.conf
echo "Acquire::https::Proxy \"http://172.21.1.1:3142\";" | sudo tee -a /etc/apt/apt.conf.d/proxy.conf
sudo apt update
sudo apt full-upgrade -y
sudo snap install microk8s --classic --channel=1.23/stable
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
HOST_IP=10.0.0.11
METALLB_START=10.0.0.200
METALLB_END=10.0.0.250
sudo cat /var/snap/microk8s/current/args/kube-apiserver | grep advertise-address || ( echo "--advertise-address ${HOST_IP}" | sudo tee -a /var/snap/microk8s/current/args/kube-apiserver; sudo microk8s.stop; sudo microk8s.start; )
sudo microk8s.enable metallb:${METALLB_START}-${METALLB_END}
sudo microk8s.enable ingress storage dns
sudo microk8s status --wait-ready
KUBECONFIG=~/kubeconfig.yaml
sudo microk8s config | tee ${KUBECONFIG}
sudo usermod -a -G microk8s ubuntu
sudo chown -f -R ubuntu ~/.kube
sudo snap alias microk8s.kubectl kubectl
echo $0 $@ complete at $(date)
\ No newline at end of file
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
# Interface Config eth0
set interfaces ethernet eth0 address dhcp
set interfaces ethernet eth0 description VyOS-public
# Interface Config eth1
set interfaces ethernet eth1 address dhcp
set interfaces ethernet eth1 description VyOS-private
# System config
set system gateway-address 10.0.0.1
set system host-name vyos-firewall
set service ssh listen-address 0.0.0.0
set service ssh port 22
set system login user osm authentication plaintext-password osm2021
# Enable masquerading
set nat source rule 100 outbound-interface 'eth0'
set nat source rule 100 source address '192.168.239.0/24'
set nat source rule 100 translation address masquerade
# SNMP
set service snmp community public authorization ro
set service snmp location "OSM Labs"
set service snmp contact "osmsupport@etsi.org"
# Save
commit
save
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment