Compare commits

...

3 Commits

Author SHA1 Message Date
6aeb5ca655 revision 2023-09-28 21:40:34 +01:00
20ff1390dd refactoring 2022-12-13 00:53:15 +00:00
7d2beca0ca info 2022-12-13 00:12:20 +00:00
3 changed files with 164 additions and 150 deletions

View File

@@ -118,3 +118,11 @@ devices:
parent: eth0 # parent ethernet name parent: eth0 # parent ethernet name
type: nic type: nic
``` ```
## swap
swap on lxc
limits.memory.swap: "false"
swap on host
https://www.shellhacks.com/swappiness-in-linux-ubuntu-how-to-change/

View File

@@ -1,16 +1,22 @@
#!/bin/bash #!/bin/bash
#start container
echo "$1"
echo "$2"
#lxc launch ubuntu $1 -p $2
#set docker requirements LXC_CONTAINER_NAME=$1
curl -s "https://git.limbosolutions.com/kb/lxc/raw/branch/main/scripts/lxc-config-docker-requirements.sh" | bash -s $1 LXC_PROFILE=$2
lxc restart $1
lxc exec $1 -- bash -c "apt update -y && apt upgrade -y"
#setup docker echo "container name: $LXC_CONTAINER_NAME"
lxc exec $1 -- bash -c "curl -s \"https://git.limbosolutions.com/kb/docker/raw/branch/main/scripts/ubuntu-fuse-setup.sh\" | bash" echo "profile: $LXC_PROFILE"
#portainer echo "starting container"
lxc exec $1 -- bash -c "curl -s \"https://git.limbosolutions.com/kb/portainer/raw/branch/main/scripts/setup.sh\" | bash" lxc launch ubuntu $LXC_CONTAINER_NAME -p $LXC_PROFILE
echo "setting lxc docker requirements"
curl -s "https://git.limbosolutions.com/kb/lxc/raw/branch/main/scripts/lxc-config-docker-requirements.sh" | bash -s $LXC_CONTAINER_NAME
lxc restart $LXC_CONTAINER_NAME
echo "updating apt"
lxc exec $LXC_CONTAINER_NAME -- sh -c "apt-get update -qq >/dev/null"
echo "upgrading apt"
lxc exec $LXC_CONTAINER_NAME -- sh -c "apt-get upgrade -qq >/dev/null"
echo "installing fuse & docker"
lxc exec $LXC_CONTAINER_NAME -- bash -c "curl -s \"https://git.limbosolutions.com/kb/docker/raw/branch/main/scripts/ubuntu-fuse-setup.sh\" | bash"
echo "installing portainer"
lxc exec $LXC_CONTAINER_NAME -- bash -c "curl -s \"https://git.limbosolutions.com/kb/portainer/raw/branch/main/scripts/setup.sh\" | bash"