feat: #8 - converted to a lxc hosting
This commit is contained in:
65
documentation/setup-lxc.md
Normal file
65
documentation/setup-lxc.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# LXC Setup
|
||||
|
||||
## Install
|
||||
|
||||
### Requirements
|
||||
|
||||
- Currently hosted using macvlan network
|
||||
- Instructions are provided for $LXC_PROFILE defined as macvlan
|
||||
_For more information how to setup a lxc profile with macvlan network https://git.limbosolutions.com/kb/lxc_
|
||||
|
||||
|
||||
Replace and execute on bash
|
||||
|
||||
```bash
|
||||
LXC_CONTAINER_NAME=gitsrv01
|
||||
LXC_PROFILE=default
|
||||
```
|
||||
|
||||
then execute
|
||||
|
||||
```bash
|
||||
## Create ubuntu container
|
||||
lxc launch ubuntu $LXC_CONTAINER_NAME -p $LXC_PROFILE
|
||||
|
||||
## Setup container for docker
|
||||
curl -s "https://git.limbosolutions.com/kb/lxc/raw/branch/main/scripts/lxc-config-docker-requirements.sh" | bash -s $LXC_CONTAINER_NAME
|
||||
|
||||
|
||||
## update ubuntu container
|
||||
lxc exec $LXC_CONTAINER_NAME -- bash -c "apt update -y && apt upgrade -y"
|
||||
|
||||
## Install fuse and docker on lxc container
|
||||
lxc exec $LXC_CONTAINER_NAME -- bash -c "curl -s \"https://git.limbosolutions.com/kb/docker/raw/branch/main/scripts/ubuntu-fuse-setup.sh\" | bash"
|
||||
|
||||
## Check docker for fusefs
|
||||
lxc exec $LXC_CONTAINER_NAME -- bash -c "docker info"
|
||||
|
||||
#Setup Portainer
|
||||
lxc exec $LXC_CONTAINER_NAME -- bash -c "curl -s \"https://git.limbosolutions.com/kb/portainer/raw/branch/main/scripts/setup.sh\" | bash"
|
||||
|
||||
#confirm container ip address
|
||||
lxc exec $LXC_CONTAINER_NAME -- bash -c "ip a"
|
||||
|
||||
lxc restart $LXC_CONTAINER_NAME
|
||||
|
||||
```
|
||||
|
||||
### Check instalation
|
||||
|
||||
From other computer
|
||||
|
||||
```bash
|
||||
ping $LXC_CONTAINER_NAME
|
||||
```
|
||||
|
||||
Access portainer (https://$LXC_CONTAINER_NAME:9443/) for inicial setup:
|
||||
|
||||
- Setup administration username and password
|
||||
|
||||
## Remove
|
||||
|
||||
```bash
|
||||
lxc rm $LXC_CONTAINER_NAME --force
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user