Unsure of how/what autodevops is

I currently have a php server (using yii) that uses a backend mysql database and i imported into gitlab as admin/test-ws.git. deployment today is NOT devops… ie i have a physical server containing apache/php connecting to another physical server with mysql.

this project has NO tests or composer.json in the root directory (because who did that 3 years ago)

i installed kubernetes in aws and have it configured in gitlab (12.10-ce) with runners inside of k8s. On every checkin “auto devops” runs and always fails at TEST and pretty much every other step. Googling this, it seems i need to setup environment variables and write my OWN .gitlab-ci.yml defeating the whole point of “auto” in autodevops. Docs are always confusing on this as it always switches from gitlab 8 (create yml) to gitlab 12 (auto) so i never know which applies to me. ok, fine, i have to manually write a 400 line yml file, so i use this template https://gitlab.com/gitlab-org/gitlab-ci-yml/blob/master/Auto-DevOps.gitlab-ci.yml but i still dont understand how it creates a container and then configures my php server to talk to mysql server which is a completely different project. and then actually deploy to the kubernetes cluster in production.

I wrote a docker-compose.yml file i use to deploy in a pod two containers, the php web server and the mysql webserver with volumes… however in “prod” i really want php and mysql to be separate and i have no idea where to start as “autodevops” only seems to work on “hello world” style applications.

I guess my question comes down to i must be missing something about how the system works because other people and internet implies it works. so what am i missing in that i must write a 400 line yaml file for every project?

also docs seem to imply that i would manage the deployment in production using helm, but again, i dont see where it creates the helm charts and how i would deploy/rollout new ones.

also the template has
POSTGRES_USER: user
POSTGRES_PASSWORD: testing-password
POSTGRES_ENABLED: “true”
POSTGRES_DB: $CI_ENVIRONMENT_SLUG
but i dont use postgres so i am not sure what those values should be.

Hi,

Auto-DevOps is an opinionated example for a complete lifecycle pipeline. It contains CI config templates, stages and jobs in combination with specific images in jobs e.g. for security scanning. If you are not certain which step is failing and are overwhelmed by the variety of possibilities, I’d recommend to start simple.

I’m not sure if you should go that route any further, or just understand the main principles of GitLab CI/CD with some first steps.

If you like, I had created a mini workshop for recent meetups with an introduction to CI/CD.

If you want to proceed with debugging the problems, I’d ask you to share access to the repository and the config files. Though, looking at the PostgreSQL parts, it seems like a rabbit hole.

Since you mentioned yii and php, maybe focussing on this specifics also is a good idea. I have no experience with yii unfortunately.

Cheers,
Michael

1 Like