We in the process migrating our application from VM to azure OpenShift.
we have:
converted docker compose files to kubernetes manfifests
created a helm chart with the manifest files
Manually giving helm install command to install the application
What are the options to automate the deployment in azure OpenShift.
Please advice.
Manual helm install we are using , looking for automating in an efficient way.
Related
I am working on a project that needs pdf files created based on a webpage, and went with wkhtmltopdf. The project consists of a python-based web app that runs in an Ubuntu 20 environment. An Azure pipeline is used to deploy the project to a Linux-based Azure app service that uses Python 3. The project runs on a localhost, but deploying it to an Azure app service has been causing issues.
After searching and trial and error, I came up with deploying my project to the Azure pipeline in Ubuntu, and then once the project has been uploaded to the Azure app service, I go into Azure, navigate to the SSH for the app service, and manually install wkhtmltopdf. For some reason, the app service runs on Debian 9, so I cannot create a script in the .yml file for the pipeline. The wkhtmltopdf package that is installed by the pipeline doesn't work with Debian.
I was wondering if there is a way to automatically have the debian app service install wkhtmltopdf. It can be done manually via the SSH in Azure, but with a lot of builds, it would be very time consuming.
Another option is changing the yml file to Debian 9 (which appears not to be supported here), or changing the app service OS to Ubuntu, which I could not find out how to do after hours of searching. It appears that it is automatically Debian 9 based on here
Here is a screenshot of the SSH on Azure
I was able to get wkhtmltopdf to install in the Debian environment by creating a script in the /home directory. I then set the Startup Command in Azure to point to this script.
I don't think Azure runs any auto scripts if you give it a startup command, thus I start the application myself at the end of the script.
Here is the script:
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.stretch_amd64.deb
apt-get install -y ./wkhtmltox_0.12.6-1.stretch_amd64.deb
rm wkhtmltox_0.12.6-1.stretch_amd64.deb
gunicorn --bind=0.0.0.0 --timeout 600 app:app
Note that I also had to add a pip install python-dotenv above pip install requirements.txt in the .yml file. Not sure why, as dotenv is in the requirements file, but I would get a dependency exception without this line in the yml.
I'm trying to install Airflow on Azure Kubernetes Service (AKS) using Helm. I've found some guides to do so, and with some difficulty I've managed to get it working fine. I was now trying to run some DAGs I made and in one of those DAGs I use the bash operator to run a specific command, and that command needs a Linux package that does not come with the default image Helm uses for Airflow...
https://github.com/airflow-helm/charts/tree/main/charts/airflow
Is there a way to include extra Linux packages for the Helm Airflow chart installation? I've looked all over for it but couldn't find anything
Hope someone can help me on this.
Helm itself is a templating language. Most of the helm charts give you a flexibility to change your base image of the applications. As long as you are using the related image, the helm chart will create a correct deployment for you.
In your case, if you want to extend the functionalities or install more packages in the base image, you will need to create your own image and push to an image repository.
For example, you can install your package like this with Dockerfile defined locally.
FROM apache/airflow:1.10.12-python3.6
RUN apt update && \
apt install vim -y && \
rm -rf /var/lib/apt/lists/*
Then, run the following command to build and upload your custom image.
docker build -t my-account/my-airflow:latest .
docker push my-account/my-airflow:latest
In your values file, you can specify your image name and tag then.
airflow:
image:
repository: my-account
tag: my-airflow
Once you apply this values file, helm will help you to change the default image to your customized one.
The tutorial in the doc also mentions the custom image but it is for the DAG building. But with the same technique, you can customize your own base image.
I'm trying to install Gitlab Runner inside my cluster in Azure Kubernetes Service (AKS), but I have 2 errors:
Helm Tiller doesn't appear in the application list of Gitlab CI:
Most of tutorials tell that it has to be installed, but today it is not even proposed as you can see here:
When I install gitlab-runner from this list, I have a message error like
"Something went wrong while installing Gitlab Runner
Operation failed. Check pod logs for install-runner for more details"
So when I check the logs, I have this:
The 2 last lines there is an error, some answers tell that I need to change the repo with Helm command, so I do that from the Azure CLI bash in the portal, but I still have the same error, I execute the code like this :
helm repo rm stable
helm repo add stable https://charts.helm.sh/stable
And then I update, do I need to give more arguments in commands?
GitLab 13.12 (May 2021) does clearly mention:
Helm v2 support
Helm v2 was officially deprecated in November of 2020, with the stable repository being de-listed from the Helm Hub shortly thereafter.
With the release of GitLab 14.0 (June 2021), which will include the 5.0 release of the GitLab Helm chart, Helm v2 will no longer be supported.
Users of the chart should upgrade to Helm v3 to deploy GitLab 14.0 and above.
So that is why Helm Tiller doesn't appear in the application list of Gitlab CI.
I have a question about deployment with firebase-tools module.
I'd like to deploy firebase by using firebase-tools node module and I succeeded to deploy this way.
However the deployment from firebase-tools module didn't show deployment logs.
In CLI case, we can see the deployment log that shows which deployment was done.
So how can I see the deployment logs in program case?
I have launched a Kubernetes managed cluster on Azure [AKS].
I am trying to deploy a Gitlab chart via Helm by downloading the zip file and trying to install it.
I use these charts .
I go to this directory C:\Users\wehappyfew\Documents\Projects\k8s\omnibus\gitlab-omnibus and I use this command
helm install --name gitlab1 --namespace dev .
and I get this error
Error: found in requirements.yaml, but missing in charts/ directory: gitlab-runner
The gitlab-runner directory exists in the C:\Users\wehappyfew\Documents\Projects\k8s\omnibus path.
What am I doing wrong?
You need to pull dependencies first.
Follow the following steps:
helm repo add gitlab https://charts.gitlab.io
helm repo list to confirm the repo is added
helm dep build
Then run the helm install command