9c8333338e73d0f17243fb959b245df8edcfaec6
cosmos-plan-crm-ansible-deploy
Ansible Playbook for deployment
Installation
- Make sure podman, Playbook Ansible and containers.podman is installed
dnf install podman dnf install ansible ansible-galaxy collection install containers.podman - Install AWS CLI as a user(Not as a root)
unzip awscliv2.zip curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" ./aws/install -i ~/.local/aws-cli -b ~/.local/bin
Setup Environment
Using quadlets to run container as service in systemd(rootless)
- Allows the user's systemd services to continue running even after they have logged out of all sessions. Trigger command from root
loginctl enable-linger {username} - Check subid and subgid(root).
cat /etc/subuid cat /etc/subgid - Add if not exists
nano /etc/subuid - Then
user:100000:65536 - Check if $HOME/.config/containers/systemd exits. Else, create folder
$HOME/.config/containers/systemd
Setup Ansible Playbook
- Navigate to cosmos-plan-crm-ansible-deploy folder
- Create containers folder
- Create crm-server.container & crm-client.container inside containers folder
- Create env-file folder
- Copy .env from crm-server/src/Web.Api/.env to env-file folder
- Create vars folder
- Create aws.yml in vars folder by command
ansible-vault create aws.yml --ask-vault-pass - Save as below
aws_access_key: aws_secret_key: aws_region: aws_account_id:
Run Ansible Playbook
- Navigate to cosmos-plan-crm-ansible-deploy folder
- Run command in terminal
ansible-playbook playbook.yml --ask-vault-pass - Key in password and let process finish
Description
Languages
Pod
100%