Compare commits

..

6 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
0dbb1ed83f . 2022-12-12 23:47:51 +00:00
6b93bc4400 testing 2022-12-12 23:28:57 +00:00
6a2e10ea7b testing 2022-12-12 23:28:22 +00:00
3 changed files with 163 additions and 148 deletions

View File

@@ -118,3 +118,11 @@ devices:
parent: eth0 # parent ethernet name
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,15 +1,22 @@
#!/bin/bash
#start container
lxc launch ubuntu $1 -p $2
LXC_CONTAINER_NAME=$1
LXC_PROFILE=$2
#set docker requirements
curl -s "https://git.limbosolutions.com/kb/lxc/raw/branch/main/scripts/lxc-config-docker-requirements.sh" | bash -s $1
lxc restart $1
lxc exec $1 -s "apt update -y && apt upgrade -y"
echo "container name: $LXC_CONTAINER_NAME"
echo "profile: $LXC_PROFILE"
#setup docker
lxc exec $1 bash -s "curl -s \"https://git.limbosolutions.com/kb/docker/raw/branch/main/scripts/ubuntu-fuse-setup.sh\" | bash"
echo "starting container"
lxc launch ubuntu $LXC_CONTAINER_NAME -p $LXC_PROFILE
#portainer
lxc exec $1 bash -s "curl -s \"https://git.limbosolutions.com/kb/portainer/raw/branch/main/scripts/setup.sh\" | bash"
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"