Compare commits
3 Commits
0dbb1ed83f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 6aeb5ca655 | |||
| 20ff1390dd | |||
| 7d2beca0ca |
@@ -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/
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
#!/bin/bash
|
||||
#start container
|
||||
echo "$1"
|
||||
echo "$2"
|
||||
#lxc launch ubuntu $1 -p $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 -- bash -c "apt update -y && apt upgrade -y"
|
||||
LXC_CONTAINER_NAME=$1
|
||||
LXC_PROFILE=$2
|
||||
|
||||
#setup docker
|
||||
lxc exec $1 -- bash -c "curl -s \"https://git.limbosolutions.com/kb/docker/raw/branch/main/scripts/ubuntu-fuse-setup.sh\" | bash"
|
||||
echo "container name: $LXC_CONTAINER_NAME"
|
||||
echo "profile: $LXC_PROFILE"
|
||||
|
||||
#portainer
|
||||
lxc exec $1 -- bash -c "curl -s \"https://git.limbosolutions.com/kb/portainer/raw/branch/main/scripts/setup.sh\" | bash"
|
||||
echo "starting container"
|
||||
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"
|
||||
Reference in New Issue
Block a user