Cloudstack integration with Keycloak

layout: post title: “Testing CloudStack Integration with KeyCloak” date: 2025-10-29 categories: [cloudstack, keycloak, integration, testing] Testing CloudStack Integration with KeyCloak Steps to Test Keycloak with CloudStack Set up Docker environment On a Linux host, ensure Docker is installed and that there’s connectivity to the CloudStack Management server. Example setup: Linux host IP: 10.0.32.236 CloudStack Management server IP: 10.0.34.45 Run the Keycloak container docker pull quay.io/keycloak/keycloak:23.0.6 docker run -d -p 8080:8080 \ -e KEYCLOAK_ADMIN=admin \ -e KEYCLOAK_ADMIN_PASSWORD=password \ -e KC_PROXY=edge \ --restart always \ -v /keycloak:/opt/jboss/keycloak/standalone/data \ --network=host \ quay.io/keycloak/keycloak:23.0.6 start-dev Access the Keycloak UI ...

October 29, 2025 · 2 min · Kiran Chavala

Cloudstack integration with AzureAD

Navigate to Azure portal > Services > Azure Entra ID Click on Enterprise Applications > Create a New Application Click on Create your own Application and provide a name. Select Integrate any other application you don’t find in the gallery (Non-gallery) > Create Once in the Application, click on Set up Single Sign-on and choose SAML Make sure SSL is enabled on the Cloudstack management server. Login to Cloudstack UI > Global settings > Access > Saml and set the following: saml2.enabled=true saml2.redirect.url=http://<mgmtip>:8080/client saml2.sp.slo.url=http://<mgmtip>:8080/client saml2.sp.sso.url=http://<mgmtip>:8080/client/api?command=samlSso Restart the Cloudstack Management service and execute the API to get the SP Metadata for Cloudstack https://cloudstack.apache.org/api/apidocs-4.19/apis/getSPMetadata.html > curl > [http://\<mgmt\>:8080/client/api?command=getSpMetadata](http://10.0.32.234:8080/client/api?command=getSpMetadata) \> > metadata.xml Upload the generated metadata XML into Azure Entra ...

August 18, 2025 · 2 min · Kiran Chavala

Importaws

October 8, 2024 · 0 min · Kiran Chavala

Monitoring Apache Cloudstack with Prometheus and Grafana

Monitoring Cloudstack with Prometheus and Grafana Cloudstack supports prometheus integration and it exports various metrics for the prometheus server to Scrape Enable prometheus integragration on Cloudstack Management server Enable prometheus plugin in Cloudstack Management server Login to the database or enable the following global setting parameters prometheus.exporter.enable : Enable the prometheus exporter plugin, management server restart needed. prometheus.exporter.allowed.ips: List of comma separated prometheus server ips (with no spaces) that should be allowed to access the metrics endpoint. ...

May 11, 2023 · 3 min · Kiran Chavala

Building Cloudstack on Ubuntu 22.04

Building cloudstack on Ubuntu 22.0.4 Apache CloudStack is open source software designed to deploy and manage large networks of virtual machines, as a highly available, highly scalable Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used by a number of service providers to offer public cloud services, and by many companies to provide an on-premises (private) cloud offering, or as part of a hybrid cloud solution. https://cloudstack.apache.org/ http://docs.cloudstack.apache.org/en/latest/ Install the following packages sudo add-apt-repository universe sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install cpu-checker build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev vim git subversion mercurial patch rsync curl wget sed openssh-client gpg gnupg2 gzip bzip2 zip unzip p7zip-full p7zip-rar python-is-python3 openjdk-11-jdk maven mysql-server mysql-client bzip2 nfs-common uuid uuid-runtime python-setuptools python3-setuptools ipmitool genisoimage nfs-kernel-server quota python3-dev python3-openssl jq Install git apt install git Install Python and pyenv ( in order to manage multiple python versions) brew install python brew install pyenv Pouplate the .zshrc to ...

May 1, 2023 · 3 min · Kiran Chavala

Building Cloudstack on Mac Os

Building cloudstack on Mac os Apache CloudStack is open source software designed to deploy and manage large networks of virtual machines, as a highly available, highly scalable Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used by a number of service providers to offer public cloud services, and by many companies to provide an on-premises (private) cloud offering, or as part of a hybrid cloud solution. https://cloudstack.apache.org/ http://docs.cloudstack.apache.org/en/latest/ Install Brew ( package manager) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Install git brew install git Install Python and pyenv ( in order to manage multiple python versions) brew install python brew install pyenv Pouplate the .zshrc to ...

May 1, 2023 · 3 min · Kiran Chavala

Using Cloudinit in Cloudstack

Launch any linux vm (Centos, Ubuntu etc) from a iso Install the cloud init package RHEL: yum install cloud-init Ubuntu : apt-get install cloud-init Configure the cloud init by adding the cloudstack datasource package vi /etc/cloud/cloud.cfg.d/99_cloudstack.cfg datasource_list: [ CloudStack, None ] Create a template of the disk Launch a vm based on the template created and pass the userdata parameter deploy virtualmachine serviceofferingid=720d1320-06d7-4918-9f2a-ef5ba7e07bf3 templateid=0d9bf1f4-288d-4510-b2c5-8e980c51c98d zoneid=10a26e0d-2085-4b09-bd0f-c726a6bd9443 networkids=cf8fcdb8-741c-4f98-b856-adc4fd99c157 userdata=I2Nsb3VkLWNvbmZpZwpydW5jbWQ6CiAgLSBta2RpciAvcnVuL2tpcmFuCiAgLSBlY2hvIGtpcmFuIHNheXMgaGkgPj4gL3J1bi9raXJhbi9zYW1wbGUudHh0CiAgLSBbIHNoLCAteGMsICAvcm9vdC9zdXJlZWRnZV9zZXJ2ZXJfdXRpbGl0eV9pbnN0YWxsZXIuc2ggLS10b2tlbiAxNDY2Q0IxNTc3NzdCQjcyIF0= Note: Make sure the userdata is encoded in base64 format if calling from Api , if you are passing the userdata from UI , there is no need to encode it ...

November 10, 2022 · 1 min · Kiran Chavala

Using Packer to deploy a image on Google Cloud

Packer is an open source tool that enables you to create identical machine images for multiple platforms from a single source template. A common use case is creating “golden images” that teams across an organization can use in cloud infrastructure. There 2 ways to write the packer code to build the image Using JSON formatted code Using HCL2 formatted code In order to interact with Google cloud we have to create a service account in GCP ...

December 1, 2021 · 7 min · Kiran Chavala

Creating Kubernetes Cluster via Vagrant

Install virtual box sudo apt install virtualbox Install vagrant curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository “deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main” sudo apt-get update && sudo apt-get install vagrant Git clone this repository git clone https://github.com/justmeandopensource/kubernetes cd vagrant-provisioning vagrant up This is going to create 1 master node with 2 worker nodes

September 27, 2021 · 1 min · Kiran Chavala

Import Existing Resources into Terrafrorm

There could be scenarios where you want to import the already existing resources from cloud providers into terraform. Terraform has an import modude which does this job and using the module is a tedious process https://www.terraform.io/docs/cli/import/index.html There is tool called Terraformer which does the job of reverese terraforming https://github.com/GoogleCloudPlatform/terraformer Google cloud https://gist.github.com/kiranchavala/54a930c8da148cc2b637c053dc1ba8ba AWS https://gist.github.com/kiranchavala/c2a01a7a43ea15cb8921a710d6cf22ea Azure https://gist.github.com/kiranchavala/18a1c555c198eb0944cbad3791602dc7 Openstack https://gist.github.com/kiranchavala/c63243b0b76adcdafc7d06d87a304370 Cloudstack https://gist.github.com/kiranchavala/c1b81f1d629b0567e08e219891d4ed48

September 22, 2021 · 1 min · Kiran Chavala