How to write yaml code for Render with docket and github action? - github

Can we write yaml code using docker and ci cd pipeline for machine learning model deployment,like we do in Heraku, if yes? what will be the main.yaml code??
...code for main.yaml for Render cloud...

Related

Is there a way we can deploy all the cloudformation templates from a gitlab repository using gitlab pipeline in aws in a single stack?

I'm looking for an option to pick all the templates from the repository without hardcode the yml template files and in future if new templates are added, the pipeline should automatically pick all of them and do the deploy and create a single stack in aws environment, without making any modification to gitlab-ci.yml/pipeline file.
I tried using deploy CLI command, it deploy all the templates but then it goes for update and start deleting one by one and only the last template resource will be available after the pipeline execution is complete.
Let me know if there is an option to do this?

How to validate Ansible playbook from azure yaml build file?

How can we validate the Ansible Playbook from yaml build file ? Yamllint ?
Yamlint is installed in Ubuntu and Linux Azure agents as stated here
So you can run yamlint inside a bash task so as to check your yml files. Choose whatever parameters that suit you.
You can run this pipeline as a build validation, so that no branch is merged into main without validation.

Parameterize Helm values yaml file in a CI pipeline

I have two projects:
Project A - Contains the Source code for my Microservice application
Project B - Contains the Kubernetes resources for Project A using Helm
Both the Projects reside in their own separate git repositories.
Project A builds using a full blown CI pipeline that build a Docker image with a tag version and pushes it into the Docker hub and then writes the version number for the Docker image into Project B via a git push from the CI server. It does so by committing a simple txt file with the Docker version that it just built.
So far so good! I now have Project B which contains this Docker version for the Microservice Project A and I now want to pass / inject this value into the Values.yaml so that when I package the Project B via Helm, I have the latest version.
Any ideas how I could get this implemented?
via a git push from the CI server. It does so by committing a simple txt file with the Docker version that it just built.
What I usually do here, is that I write the value to the correct field in the yaml directly. To work with yaml on the command line, I recommend the cli tool yq.
I usually use full Kubernetes Deployment manifest yaml and I typically update the image field with this yq command:
yq write --inplace deployment.yaml 'spec.template.spec.containers(name==myapp).image' <my-registry>/<my-image-repo>/<image-name>:<tag-name>
and after that commit the yaml file to the repo with yaml manifests.
Now, you use Helm but it is still Yaml, so you should be able to solve this in a similar way. Maybe something like:
yq write --inplace values.yaml 'app.image' <my-image>

Can I create Release pipeline (CD) in Azure DevOps directly using YAML?

I need to create a release pipeline (CD) without creating a CI pipeline. I will use artifacts from GitHub. Can I create the CD using YAML or it is like I need to create CI with YAML and CD can not be created directly using YAML ?
You can't create Release classic pipeline using YAML. Your only option is the editor. But YAML has something different (which in the future can replace Release pipelines - this is my personal opinion). It is job deployments. Please take a look here.

Azure pipelines, how to use a Dockerfile from an other repository?

I'm trying to build a Azure DevOps pipeline that uses a separate repository for Dockerfiles / templates. Whats the cleanest way to use Dockerfiles from another repository?
We have experimented with having the template refer to the dockerfile but the build server seems to not have access to the filepath.
In Dockerfile repository:
steps:
- script: docker build -f pathTo/Dockerfile
In build repository:
steps:
- template: Dockerfilerepository.yml
We want this to create a docker build process in side the building repository but we instead get this error message:
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/vsts/work/1/s/pipelines: no such file or directory
you'd need to checkout that repo separately and then you can use files in that repo, you can use a script step for that, something like this:
git clone https://x-access-token:$(github-access-token)#github.com/ORG/OTHER_PRIVATE_REPO.git
but its probably not the best idea to keep docker files in a separate repo