Nothing Special   »   [go: up one dir, main page]

Env Demo

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

1-create feature branche from release/x.x.

 Git fetch
 Git checkout <branche_name>

Make sure there is no changes in the source control menu

Make sure the job artifacts are the latest (.env Build) and you can execute import_jobs without
any problem (test it on another vm)

 Change VERSION.XML as:

 Run docker compose preparation:


>cd Build
>docker compose -f docker-compose-preparation.yml up --build
 We are going to make a copy of the migrations: in new terminal

 Cd home/testauto/automationportalv2/
 Mkdir sprint
 Cd sprint
 Docker ps
And get the id of build-backend
 Docker cp id:/ap_v2/backend/apps .

Succefully copied 3.59MB to /home/…/sprint

 Cp --parents apps/*/migrations/*.py ../Build/backend


 After copying the migrations we delete the folder sprint
 Cd ..
 Rm -rf sprint
 Then we stop the docker compose preparation (cltr +c)
 Commit and push the migrations + VERSION.XML + .env Build(if we changed it)
 Create pull request + merge

2- Go to stacks project: home/testauto/stacks on branche (master)

 Git pull
 git push
 go to DEPLOY>Dev>automationportal.yml
 Search for: JOBS_ARTIFACT and replace all jobs artifacts url with the new job artifact url from
(.env)
 Wait for the APV2 plan to end (the merge of migrations and version.xml)
 Go to Push Docker Images

 Go to backend image url (echo pushing ….)

Expand and Copy the image url

In automationportal.yml search for backend and replace the value of image with image_url

Go down until you see command and make sur we have sleep 120:

 Same for the frontend image

Copy and it and replace the value of image in frontend

 For postgres:

Copy and replace in services: db: image:

 For redis:

Copy and replace in redis_apv2: image:

 Check also the other images: celery processing..


 Commit and push
****************************************************************************
***************************************************************************

1- go to portainer https://dev-deploy-portainer.my-nx.com/#!/home

Select dev:

Go to stacks, select the old env demo and delete it

2- Go to Jenkins: https://jenkins.my-nx.com/

 Comet > comet-deploy > deploy > create ceph snapshot

 Select “lancer le build avec parameteres”


 Give a name to the snapshot exp: SP-ANDOR-84-DEMO
 Click build
 Return to Jenkins and go to Open blue ocean

Go to the plan of create snapshot with the name “fix stack” and make sure the snapshot is
created

 Return to Jenkins once again and select refresh staging demo environment

 Choose the snapshot and the environment(== demo) then click on build
 Go to the plan and make sure the image is created

 Go to portainer >stacks and add a stack

Add a name and Fill the other fields the same as the screenshot

Go down and click on deploy stack.


Run the migrate, make migrations, import jobs, set_playbooks

Don’t run synchro!!!! (delete the task)

You might also like