Compare commits
6 Commits
f8ee7d79d6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 6aeb5ca655 | |||
| 20ff1390dd | |||
| 7d2beca0ca | |||
| 0dbb1ed83f | |||
| 6b93bc4400 | |||
| 6a2e10ea7b |
@@ -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/
|
||||||
|
|||||||
@@ -1,15 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#start container
|
LXC_CONTAINER_NAME=$1
|
||||||
lxc launch ubuntu $1 -p $2
|
LXC_PROFILE=$2
|
||||||
|
|
||||||
#set docker requirements
|
echo "container name: $LXC_CONTAINER_NAME"
|
||||||
curl -s "https://git.limbosolutions.com/kb/lxc/raw/branch/main/scripts/lxc-config-docker-requirements.sh" | bash -s $1
|
echo "profile: $LXC_PROFILE"
|
||||||
lxc restart $1
|
|
||||||
lxc exec $1 -s "apt update -y && apt upgrade -y"
|
|
||||||
|
|
||||||
#setup docker
|
echo "starting container"
|
||||||
lxc exec $1 bash -s "curl -s \"https://git.limbosolutions.com/kb/docker/raw/branch/main/scripts/ubuntu-fuse-setup.sh\" | bash"
|
lxc launch ubuntu $LXC_CONTAINER_NAME -p $LXC_PROFILE
|
||||||
|
|
||||||
#portainer
|
echo "setting lxc docker requirements"
|
||||||
lxc exec $1 bash -s "curl -s \"https://git.limbosolutions.com/kb/portainer/raw/branch/main/scripts/setup.sh\" | bash"
|
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