First assignment (Docker + CI/CD)

 

Schedule:

Monday, the 29th

11:00 – 11:30

Receive these instructions

11:30 – 18:00

Work on the tasks

 

 

 

Tuesday, the 30th

9:30 – 10:00

Daily

10:00 – 17:00

Work on the tasks

17:00 – 18:00

Present the project to the assigned mentor

 

The application should be php-fpm app with mysql and nginx. Very simple app, like hello <name>, but the name should be obtained from the db. Optional: specify a parameter like: line=<value> in order to specify the table line.

Instructions:

-              Use Github and Github Actions

 

-              SECURE VM:  LOGIN WITH SSH KEY ONLY

·      host: bianca.zambeste.ro, user bianca

·      host: grigo.zambeste.ro, user grigo

 

-              There will be two environments, Test and Prod. Everything must be deployed and validated in Test, check if everything is ok, then merged to Prod. Check gitflow.

 

-              From one Dockerfile generate two images, one for Test, one for Prod. Only the one for Test should include tools such as ping, traceroute, ps, strace, host, netstat. Base image will be alpine.

 

-              Nginx configuration and php syntax will be checked for errors as part of the PR validation

 

-                  Implement health checks for all containers.

-               

 

-              (Optional) Use aws container registry and deploy on aws on an ec2 instance of size t3a.micro.

 

-              All credentials, for each environment,  will be stored securely in Github.

 

-              Use a vulnerability scanner tool to scan images.

 

-              Cleanup the container registry. Keep the latest 5 images for each environment.

 

-              Take a backup of the DB as part of the  deployment process.

 

-              After each successful prod deployment, tag the commit with the release number (you need to increase the old release number which can be found in the file version.txt)

 

-              Implement a DB backup pipeline that runs overnight and has a retention period of 7 days.

 

-              Integrate webhooks to be alerted on Teams if deployment/PR validation  succeeds or not.

 

-              (Optional) Deploy the app with zero downtime.

 

-              (Optional): Display phpinfo if a specific header is provided (Ex. X_INFO: yes)

 

-              (Optional): The test environment should be available only from PS office/VPN