1
0
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity Security Code Quality

cicd: modified README.md #2

Merged
Muhammad-Ikhwan-Bin-Khairul-Jamil merged 1 commits from cicd into main 2025-09-25 03:08:49 +00:00
Showing only changes of commit d9bb69a7a9 - Show all commits

View File

@@ -1,3 +1,68 @@
# cosmos-plan-crm-ansible-deploy # cosmos-plan-crm-ansible-deploy
Ansible Playbook for deployment Ansible Playbook for deployment
## Installation
1. Make sure podman, Playbook Ansible and containers.podman is installed
```bash
dnf install podman
dnf install ansible
ansible-galaxy collection install containers.podman
```
2. Install AWS CLI as a user(Not as a root)
```bash
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)
1. Allows the user's systemd services to continue running even after they have logged out of all sessions. Trigger command from root
```bash
loginctl enable-linger {username}
```
2. Check subid and subgid(root).
```bash
cat /etc/subuid
cat /etc/subgid
```
3. Add if not exists
```bash
nano /etc/subuid
```
4. Then
```makefile
user:100000:65536
```
5. Check if $HOME/.config/containers/systemd exits. Else, create folder
```bash
$HOME/.config/containers/systemd
```
## Setup Ansible Playbook
1. Navigate to cosmos-plan-crm-ansible-deploy folder
2. Create containers folder
3. Create crm-server.container & crm-client.container inside containers folder
4. Create env-file folder
5. Copy .env from crm-server/src/Web.Api/.env to env-file folder
4. Create vars folder
5. Create aws.yml in vars folder by command
```bash
ansible-vault create aws.yml --ask-vault-pass
```
6. Save as below
```makefile
aws_access_key:
aws_secret_key:
aws_region:
aws_account_id:
```
## Run Ansible Playbook
1. Navigate to cosmos-plan-crm-ansible-deploy folder
2. Run command in terminal
```bash
ansible-playbook playbook.yml --ask-vault-pass
```
3. Key in password and let process finish