-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DevOps] Config and start prd server on Vscale with new OS version, fix deply #2605
Comments
Little action plan:
|
started app without certs on new instance here: http://188.68.222.249/ |
certificates copied, frontend with tls was started and dns records changed from old to new instance |
hm, after merge PR #2618 there are some errors: |
fixed by stopping locally front and backend containers and deploying it via pipeline |
about brief documentation: # login as root and update all packages and kernels
apt update
apt upgrade
reboot
# install docker from the doc https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04
apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt install docker-ce
systemctl status docker
# install docker-compose
apt install docker-compose
# create user for github-runner
useradd github-runner
mkdir /home/github-runner
chown github-runner:github-runner /home/github-runner
su - github-runner
# install github-runner from documentation described on page https://github.com/Brain-up/brn/settings/actions/runners/new
mkdir actions-runner && cd actions-runner
curl -o actions-runner-linux-x64-2.319.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.319.1/actions-runner-linux-x64-2.319.1.tar.gz
echo "3f6efb7488a183e291fc2c62876e14c9ee732864173734facc85a1bfb1744464 actions-runner-linux-x64-2.319.1.tar.gz" | shasum -a 256 -c
tar xzf ./actions-runner-linux-x64-2.319.1.tar.gz
./config.sh --url https://github.com/Brain-up/brn --token AAXXXXXX # taken from https://github.com/Brain-up/brn/settings/actions/runners/new
# to create backup from volumes on old system
for i in brn_dbdata brn_certbot-etc brn_certbot-var brn_web-root-for-certbot; do echo $i; docker run --rm -v ${i}:/data -v $(pwd):/backup busybox tar czf /backup/backup_${i}.tar.gz /data; done
# then copy backup.tar.gz file
scp -r root@31.184.253.199:/root/backup ./
scp -r backup root@188.68.222.249:/root/
# restore backup to volume with db
docker run --rm -v brn_dbdata:/dest -v $(pwd):/source busybox tar xvzf "/source/backup.tar.gz" -C /dest
# install git for checkout process
apt install git
# provide access to docker from github-runner
usermod -aG docker github-runner
# add swap with 1GB
dd if=/dev/zero of=/swapfile bs=1024 count=1048576
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap defaults 0 0">>/etc/fstab
# start db from github-runner
docker-compose up -d --no-deps db_brn |
So this issue can be closed |
[DevOps] Config and start prd server on Vscale with new OS version, fix deploy
https://vds.selectel.ru/
ask creds Lena https://t.me/ElenaLovesSpb
The text was updated successfully, but these errors were encountered: