[{"content":" layout: post title: \u0026ldquo;Testing CloudStack Integration with KeyCloak\u0026rdquo; date: 2025-10-29 categories: [cloudstack, keycloak, integration, testing] Testing CloudStack Integration with KeyCloak Steps to Test Keycloak with CloudStack Set up Docker environment\nOn 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\ndocker 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\nURL: http://10.0.32.236:8080 Credentials: admin/password\nCreate a Realm\nSwitch to the created Realm and Create a new client or choose to import an existing client.\nConfigure CloudStack for SAML Integration\nUpdate the following Global Settings in CloudStack UI:\nSetting\tValue saml2.enabled\ttrue saml2.redirect.url\thttp://:8080/client saml2.sp.slo.url\thttp://:8080/client saml2.sp.sso.url\thttp://:8080/client/api?command=samlSso\nRestart the CloudStack Management service\nExecute the following API command to get SP metadata:\ncurl http://:8080/client/api?command=getSpMetadata \u0026gt; metadata.xml\nCopy the value and paste in step 5 Configure Keycloak\nIn Keycloak:\nGo to Clients → Client Scopes \u0026gt; Select org.apache.cloudstack-dedicated\nAdd a Mapper from Predefined Mapper, Select a user property and provide the following details\nField\tValue Name\temail Property\temail Friendly Name\temail SAML Attribute Name\turn:oid:1.2.840.113549.1.9.1 SAML Attribute NameFormat\tBasic ![](/img/keycloakimage6.png) ![](/img/keycloakimage7.png) ![](/img/keycloakimage8.png) Create a user in Keycloak\nObtain and Configure IDP Metadata\nGet the SAML 2.0 Identity Provider Metadata URL\nExample:\nhttp://10.0.32.236:8080/realms/kiranchavala/protocol/saml/descriptor\nConfigure SAML IDP in CloudStack\nUpdate the following Global Settings:\nsaml2.enabled=true saml2.default.idpid=http://app.example.com saml2.idp.metadata.url=http://10.0.32.236:8080/realms/kiranchavala/protocol/saml/descriptor saml2.redirect.url=http://10.0.32.234:8080/client saml2.sp.slo.url=http://10.0.32.234:8080/client saml2.sp.sso.url=http://10.0.32.234:8080/client/api?command=samlSso saml2.user.attribute=email\nCreate a matching user in CloudStack\nExample username: kiranchavala@gmail.com\nVerify SSO Integration\nLogin via SSO\nSelect Keycloak as the identity provider.\nYou should be redirected to the Keycloak login page.\nUpon successful authentication, you’ll be logged into CloudStack.\nTroubleshooting\nSAML Attribute Mapping Reference github.com/simplesamlphp/simplesamlphp/blob/master/attributemap/urn2oid.php. Firefox SAML Tracer Addon https://addons.mozilla.org/en-US/firefox/addon/saml-tracer/ ","permalink":"https://kiranchavala.github.io/blog/cloudstack-integration-with-keycloak/","summary":"\u003chr\u003e\n\u003ch2 id=\"categories-cloudstack-keycloak-integration-testing\"\u003elayout: post\ntitle: \u0026ldquo;Testing CloudStack Integration with KeyCloak\u0026rdquo;\ndate: 2025-10-29\ncategories: [cloudstack, keycloak, integration, testing]\u003c/h2\u003e\n\u003ch1 id=\"testing-cloudstack-integration-with-keycloak\"\u003eTesting CloudStack Integration with KeyCloak\u003c/h1\u003e\n\u003ch2 id=\"steps-to-test-keycloak-with-cloudstack\"\u003eSteps to Test Keycloak with CloudStack\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eSet up Docker environment\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eOn a Linux host, ensure Docker is installed and that there’s connectivity to the CloudStack Management server.\u003c/li\u003e\n\u003cli\u003eExample setup:\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eLinux host IP: 10.0.32.236\nCloudStack Management server IP: 10.0.34.45\n\u003c/code\u003e\u003c/pre\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eRun the Keycloak container\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edocker pull quay.io/keycloak/keycloak:23.0.6\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edocker run -d -p 8080:8080 \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#ae81ff\"\u003e\u003c/span\u003e  -e KEYCLOAK_ADMIN\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eadmin \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#ae81ff\"\u003e\u003c/span\u003e  -e KEYCLOAK_ADMIN_PASSWORD\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003epassword \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#ae81ff\"\u003e\u003c/span\u003e  -e KC_PROXY\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eedge \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#ae81ff\"\u003e\u003c/span\u003e  --restart always \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#ae81ff\"\u003e\u003c/span\u003e  -v /keycloak:/opt/jboss/keycloak/standalone/data \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#ae81ff\"\u003e\u003c/span\u003e  --network\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ehost \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#ae81ff\"\u003e\u003c/span\u003e  quay.io/keycloak/keycloak:23.0.6 start-dev\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e\u003cstrong\u003eAccess the Keycloak UI\u003c/strong\u003e\u003c/p\u003e","title":"Cloudstack integration with Keycloak"},{"content":" Navigate to Azure portal \u0026gt; Services \u0026gt; Azure Entra ID Click on Enterprise Applications \u0026gt; Create a New Application Click on Create your own Application and provide a name.\nSelect Integrate any other application you don\u0026rsquo;t find in the gallery (Non-gallery) \u0026gt; 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.\nLogin to Cloudstack UI \u0026gt; Global settings \u0026gt; Access \u0026gt; Saml and set the following: saml2.enabled=true saml2.redirect.url=http://\u0026lt;mgmtip\u0026gt;:8080/client saml2.sp.slo.url=http://\u0026lt;mgmtip\u0026gt;:8080/client saml2.sp.sso.url=http://\u0026lt;mgmtip\u0026gt;:8080/client/api?command=samlSso Restart the Cloudstack Management service and execute the API to get the SP Metadata for Cloudstack\nhttps://cloudstack.apache.org/api/apidocs-4.19/apis/getSPMetadata.html \u0026gt; curl \u0026gt; [http://\\\u0026lt;mgmt\\\u0026gt;:8080/client/api?command=getSpMetadata](http://10.0.32.234:8080/client/api?command=getSpMetadata) \\\u0026gt; \u0026gt; metadata.xml Upload the generated metadata XML into Azure Entra Navigate to Attributes and Claims, then click Edit.\nYou can either create a new attribute or copy an existing attribute. Let the attribute name be:\nhttp://schemas.xmlsoap.org/ws/2005/05/identity/claims/firstname\nNavigate to SAML Certificates and copy the App Federation Metadata URL. In CloudStack \u0026gt; Global Settings, populate the values and restart the CloudStack management service. saml2.idp.metadata.url=https://login.microsoftonline.com/58fb75e6-9db3-4492-b319-a095a08786ce/federationmetadata/2007-06/federationmetadata.xml?appid=024a61e1-afa6-46b1-85da-622aa259f8 saml2.user.attribute=http://schemas.xmlsoap.org/ws/2005/05/identity/claims/firstname Go back to the Azure Entra Application, then add an existing Azure user to the application. In CloudStack, create a user account and select the SAML IDP.\nThe details should be the same as the Azure account. Login via SAML SSO. Test using the SAML Tracer browser extension:\nFirefox Add-on: SAML Tracer ","permalink":"https://kiranchavala.github.io/blog/cloudstack-integration-with-azuread/","summary":"\u003col\u003e\n\u003cli\u003eNavigate to \u003cstrong\u003eAzure portal \u0026gt; Services \u0026gt; Azure Entra ID\u003c/strong\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003cimg loading=\"lazy\" src=\"/img/image1.png\"\u003e\u003c/p\u003e\n\u003col start=\"2\"\u003e\n\u003cli\u003eClick on \u003cstrong\u003eEnterprise Applications \u0026gt; Create a New Application\u003c/strong\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003cimg loading=\"lazy\" src=\"/img/image2.png\"\u003e\u003cbr\u003e\n\u003cimg loading=\"lazy\" src=\"/img/image3.png\"\u003e\u003c/p\u003e\n\u003col start=\"3\"\u003e\n\u003cli\u003eClick on \u003cstrong\u003eCreate your own Application\u003c/strong\u003e and provide a name.\u003cbr\u003e\nSelect \u003cem\u003eIntegrate any other application you don\u0026rsquo;t find in the gallery (Non-gallery)\u003c/em\u003e \u0026gt; \u003cstrong\u003eCreate\u003c/strong\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003cimg loading=\"lazy\" src=\"/img/image4.png\"\u003e\u003cbr\u003e\n\u003cimg loading=\"lazy\" src=\"/img/image5.png\"\u003e\u003c/p\u003e\n\u003col start=\"4\"\u003e\n\u003cli\u003eOnce in the Application, click on \u003cstrong\u003eSet up Single Sign-on\u003c/strong\u003e and choose \u003cstrong\u003eSAML\u003c/strong\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003cimg loading=\"lazy\" src=\"/img/image6.png\"\u003e\u003cbr\u003e\n\u003cimg loading=\"lazy\" src=\"/img/image7.png\"\u003e\u003c/p\u003e\n\u003col start=\"5\"\u003e\n\u003cli\u003eMake sure SSL is enabled on the Cloudstack management server.\u003cbr\u003e\nLogin to Cloudstack UI \u0026gt; \u003cstrong\u003eGlobal settings \u0026gt; Access \u0026gt; Saml\u003c/strong\u003e and set the following:\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esaml2.enabled=true\nsaml2.redirect.url=http://\u0026lt;mgmtip\u0026gt;:8080/client\nsaml2.sp.slo.url=http://\u0026lt;mgmtip\u0026gt;:8080/client\nsaml2.sp.sso.url=http://\u0026lt;mgmtip\u0026gt;:8080/client/api?command=samlSso\n\u003c/code\u003e\u003c/pre\u003e\u003col start=\"6\"\u003e\n\u003cli\u003eRestart the Cloudstack Management service and execute the API to get\nthe SP Metadata for Cloudstack\u003cbr\u003e\n\u003cbr\u003e\n\u003ca href=\"https://cloudstack.apache.org/api/apidocs-4.19/apis/getSPMetadata.html\"\u003ehttps://cloudstack.apache.org/api/apidocs-4.19/apis/getSPMetadata.html\u003c/a\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e\u0026gt; curl\n\u0026gt; [http://\\\u0026lt;mgmt\\\u0026gt;:8080/client/api?command=getSpMetadata](http://10.0.32.234:8080/client/api?command=getSpMetadata) \\\u0026gt;\n\u0026gt; metadata.xml\n\u003c/code\u003e\u003c/pre\u003e\u003col start=\"7\"\u003e\n\u003cli\u003eUpload the generated metadata XML into Azure Entra\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003cimg alt=\"Upload Metadata\" loading=\"lazy\" src=\"/img/image8.png\"\u003e\u003c/p\u003e","title":"Cloudstack integration with AzureAD"},{"content":"","permalink":"https://kiranchavala.github.io/blog/import-aws/","summary":"","title":"Importaws"},{"content":"Monitoring Cloudstack with Prometheus and Grafana\nCloudstack supports prometheus integration and it exports various metrics for the prometheus server to Scrape\nEnable prometheus integragration on Cloudstack Management server Enable prometheus plugin in Cloudstack Management server Login to the database or enable the following global setting parameters\nprometheus.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.\nmysql\u0026gt;update configuration set value=\u0026#34;true\u0026#34; where name=\u0026#34;prometheus.exporter.enable\u0026#34;; mysql\u0026gt;update configuration set value=\u0026#34;127.0.0.1,10.0.33.227\u0026#34; where name=\u0026#34;prometheus.exporter.allowed.ips\u0026#34;; Restart the cloudstack mangement server systemctl restart cloudstack-managment Check if the management server is exporting the metrics on port 9595 curl -vv 127.0.0.1:9595/metrics\ncloudstack_host_is_dedicated{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,hostname=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm1\u0026#34;,ip=\u0026#34;10.0.33.130\u0026#34;} 0 cloudstack_host_cpu_usage_mhz_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,hostname=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm1\u0026#34;,ip=\u0026#34;10.0.33.130\u0026#34;,overprovisioningfactor=\u0026#34;2.0\u0026#34;,filter=\u0026#34;used\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 2500.00 cloudstack_host_cpu_usage_mhz_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,hostname=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm1\u0026#34;,ip=\u0026#34;10.0.33.130\u0026#34;,overprovisioningfactor=\u0026#34;2.0\u0026#34;,filter=\u0026#34;total\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 6300.00 cloudstack_host_memory_usage_mibs_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,hostname=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm1\u0026#34;,ip=\u0026#34;10.0.33.130\u0026#34;,overprovisioningfactor=\u0026#34;1.0\u0026#34;,filter=\u0026#34;used\u0026#34;,dedicated=\u0026#34;0\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 2816.00 cloudstack_host_memory_usage_mibs_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,hostname=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm1\u0026#34;,ip=\u0026#34;10.0.33.130\u0026#34;,overprovisioningfactor=\u0026#34;1.0\u0026#34;,filter=\u0026#34;total\u0026#34;,dedicated=\u0026#34;0\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 6940.01 cloudstack_host_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,hostname=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm1\u0026#34;,address=\u0026#34;10.0.33.130\u0026#34;} 5 cloudstack_host_vms_cores_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,hostname=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm1\u0026#34;,ip=\u0026#34;10.0.33.130\u0026#34;,filter=\u0026#34;used\u0026#34;,dedicated=\u0026#34;0\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 5 cloudstack_host_vms_cores_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,hostname=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm1\u0026#34;,ip=\u0026#34;10.0.33.130\u0026#34;,filter=\u0026#34;total\u0026#34;,dedicated=\u0026#34;0\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 3 cloudstack_host_cpu_usage_mhz_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;allocated\u0026#34;} 2500.00 cloudstack_host_memory_usage_mibs_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;allocated\u0026#34;} 2816.00 cloudstack_host_vms_cores_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;allocated\u0026#34;} 5 cloudstack_hosts_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;online\u0026#34;} 1 cloudstack_hosts_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;offline\u0026#34;} 0 cloudstack_hosts_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;total\u0026#34;} 1 cloudstack_hosts_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;total\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 1 cloudstack_hosts_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;online\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 1 cloudstack_hosts_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;offline\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_host_vms_cores_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;allocated\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_host_cpu_usage_mhz_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;allocated\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0.00 cloudstack_host_memory_usage_mibs_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;allocated\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0.00 cloudstack_vms_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;starting\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_vms_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;running\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_vms_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;stopping\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_vms_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;stopped\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_vms_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;destroyed\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_vms_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;expunging\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_vms_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;migrating\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_vms_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;error\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_vms_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;unknown\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_vms_total_by_tag{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;shutdown\u0026#34;,tags=\u0026#34;kiran\u0026#34;} 0 cloudstack_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;starting\u0026#34;} 0 cloudstack_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;running\u0026#34;} 5 cloudstack_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;stopping\u0026#34;} 0 cloudstack_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;stopped\u0026#34;} 0 cloudstack_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;destroyed\u0026#34;} 0 cloudstack_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;expunging\u0026#34;} 0 cloudstack_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;migrating\u0026#34;} 0 cloudstack_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;error\u0026#34;} 0 cloudstack_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;unknown\u0026#34;} 0 cloudstack_vms_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;shutdown\u0026#34;} 0 cloudstack_volumes_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;ready\u0026#34;} 5 cloudstack_volumes_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;destroy\u0026#34;} 0 cloudstack_volumes_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;total\u0026#34;} 5 cloudstack_storage_pool_gibs_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,name=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm-pri1\u0026#34;,address=\u0026#34;10.0.32.4:/acs/primary/ref-trl-4857-k-M7-kiran-chavala/ref-trl-4857-k-M7-kiran-chavala-kvm-pri1\u0026#34;,type=\u0026#34;primary\u0026#34;,overprovisioningfactor=\u0026#34;2.0\u0026#34;,filter=\u0026#34;used\u0026#34;} 1252.33 cloudstack_storage_pool_gibs_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,name=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm-pri1\u0026#34;,address=\u0026#34;10.0.32.4:/acs/primary/ref-trl-4857-k-M7-kiran-chavala/ref-trl-4857-k-M7-kiran-chavala-kvm-pri1\u0026#34;,type=\u0026#34;primary\u0026#34;,overprovisioningfactor=\u0026#34;2.0\u0026#34;,filter=\u0026#34;allocated\u0026#34;} 20.88 cloudstack_storage_pool_gibs_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,name=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm-pri1\u0026#34;,address=\u0026#34;10.0.32.4:/acs/primary/ref-trl-4857-k-M7-kiran-chavala/ref-trl-4857-k-M7-kiran-chavala-kvm-pri1\u0026#34;,type=\u0026#34;primary\u0026#34;,overprovisioningfactor=\u0026#34;2.0\u0026#34;,filter=\u0026#34;unallocated\u0026#34;} 4073.12 cloudstack_storage_pool_gibs_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,name=\u0026#34;ref-trl-4857-k-M7-kiran-chavala-kvm-pri1\u0026#34;,address=\u0026#34;10.0.32.4:/acs/primary/ref-trl-4857-k-M7-kiran-chavala/ref-trl-4857-k-M7-kiran-chavala-kvm-pri1\u0026#34;,type=\u0026#34;primary\u0026#34;,overprovisioningfactor=\u0026#34;2.0\u0026#34;,filter=\u0026#34;total\u0026#34;} 2047.00 cloudstack_storage_pool_gibs_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,name=\u0026#34;NFS://10.0.32.4/acs/secondary/ref-trl-4857-k-M7-kiran-chavala/ref-trl-4857-k-M7-kiran-chavala-sec1\u0026#34;,address=\u0026#34;NFS://10.0.32.4/acs/secondary/ref-trl-4857-k-M7-kiran-chavala/ref-trl-4857-k-M7-kiran-chavala-sec1\u0026#34;,type=\u0026#34;secondary\u0026#34;,filter=\u0026#34;used\u0026#34;} 1252.33 cloudstack_storage_pool_gibs_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,name=\u0026#34;NFS://10.0.32.4/acs/secondary/ref-trl-4857-k-M7-kiran-chavala/ref-trl-4857-k-M7-kiran-chavala-sec1\u0026#34;,address=\u0026#34;NFS://10.0.32.4/acs/secondary/ref-trl-4857-k-M7-kiran-chavala/ref-trl-4857-k-M7-kiran-chavala-sec1\u0026#34;,type=\u0026#34;secondary\u0026#34;,filter=\u0026#34;total\u0026#34;} 2047.00 cloudstack_private_ips_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;allocated\u0026#34;} 2 cloudstack_private_ips_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;total\u0026#34;} 20 cloudstack_public_ips_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;allocated\u0026#34;} 3 cloudstack_public_ips_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;total\u0026#34;} 20 cloudstack_shared_network_ips_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;allocated\u0026#34;} 0 cloudstack_shared_network_ips_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;total\u0026#34;} 0 cloudstack_vlans_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;allocated\u0026#34;} 1 cloudstack_vlans_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,filter=\u0026#34;total\u0026#34;} 20 cloudstack_active_domains_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;} 1 cloudstack_active_accounts_total{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;} 1 cloudstack_vms_total_by_size{zone=\u0026#34;ref-trl-4857-k-M7-kiran-chavala\u0026#34;,cpu=\u0026#34;1\u0026#34;,memory=\u0026#34;512\u0026#34;} 2 cloudstack_domain_limit_cpu_cores_total 0 cloudstack_domain_limit_memory_mibs_total 0 cloudstack_domain_resource_count{domain=\u0026#34;/\u0026#34;, type=\u0026#34;memory\u0026#34;} 1024 cloudstack_domain_resource_count{domain=\u0026#34;/\u0026#34;, type=\u0026#34;cpu\u0026#34;} 2 cloudstack_domain_resource_count{domain=\u0026#34;/\u0026#34;, type=\u0026#34;primary_storage\u0026#34;} 17179869184 cloudstack_domain_resource_count{domain=\u0026#34;/\u0026#34;, type=\u0026#34;secondary_storage\u0026#34;} 13832814592 * Connection #0 to host 127.0.0.1 left intact Steps to install Prometheus server The steps include to start the prometheus as a systemd service\nDownload the latest binary of Prometheus from https://prometheus.io/ https://prometheus.io/download/ wget \u0026#34;https://github.com/prometheus/prometheus/releases/download/v2.43.1/prometheus-2.43.1.linux-amd64.tar.gz\u0026#34; Untar the package tar -xvf prometheus-2.43.1.linux-amd64.tar.gz cd prometheus-2.43.1.linux-amd64 Create a prometheus user and change the directory permissions and also copy the necessary permissions sudo useradd --no-create-home --shell /bin/false prometheus sudo mkdir /etc/prometheus sudo mkdir /var/lib/prometheus sudo chown prometheus:prometheus /etc/prometheus sudo chown prometheus:prometheus /var/lib/prometheus sudo cp prometheus /usr/local/bin sudo cp promtool /usr/local/bin sudo chown prometheus:prometheus /usr/local/bin/prometheus sudo chown prometheus:prometheus /usr/local/bin/promtool sudo cp -r consoles /etc/prometheus/ sudo cp -r console_libraries/ /etc/prometheus/ sudo chown -R prometheus:prometheus /etc/prometheus/consoles sudo chown -R prometheus:prometheus /etc/prometheus/console_libraries/ sudo cp prometheus.yml /etc/prometheus/ sudo chown prometheus:prometheus /etc/prometheus/prometheus.yml Create the systemd file sudo vi /etc/systemd/system/prometheus.service [Unit] Description=Prometheus Wants=network-online.target After=network-online.target [Service] User=prometheus Group=prometheus Type=simple ExecStart=/usr/local/bin/prometheus \\ --config.file /etc/prometheus/prometheus.yml \\ --storage.tsdb.path /var/lib/prometheus/ \\ --web.console.templates=/etc/prometheus/consoles \\ --web.console.libraries=/etc/prometheus/console_libraries [Install] WantedBy=multi-user.target sudo systemctl daemon-reload sudo systemctl start prometheus sudo systemctl status prometheus sudo systemctl enable prometheus Check if prometheus is listening on port 9090 Go to the browser\nhttp://:9090/graph\ncurl -vv :9090/metrics\nEdit the prometheus.yaml to scrape the metrics from - job_name: \u0026#34;Cloudstack-metrics\u0026#34; static_configs: - targets: [\u0026#34;\u0026lt;ip of cloudstack managment server\u0026gt;:9595\u0026#34;] You should be able to get the metrics in the prometheus dashboard\nSteps to install Grafana Add the grafana repo vi /etc/yum.repos.d/grafana.repo [grafana] name=grafana baseurl=https://rpm.grafana.com repo_gpgcheck=1 enabled=1 gpgcheck=1 gpgkey=https://rpm.grafana.com/gpg.key sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.cr Install Grafana yum install grafana systemctl start grafana-server systemctl status grafana-server Check is Grafana is working on Port 3000 http://:3000\nHome \u0026gt; Administration \u0026gt; Add data sources\u0026gt; select Prometheus Now you can explore the metrics via Grafana and create nice dashboard Ref:\nhttps://www.youtube.com/watch?v=m8mYdWHoxLY\u0026amp;t=2033s https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+Metrics+Exporter+for+Prometheus ","permalink":"https://kiranchavala.github.io/blog/monitoring-apache-cloudstsack-with-prometheus-and-grafana/","summary":"\u003cp\u003eMonitoring Cloudstack with Prometheus and Grafana\u003c/p\u003e\n\u003cfigure\u003e\n    \u003cimg loading=\"lazy\" src=\"/img/Prometheus.png\"/\u003e \n\u003c/figure\u003e\n\n\u003cp\u003eCloudstack supports prometheus integration and it exports various metrics for the prometheus server to Scrape\u003c/p\u003e\n\u003ch2 id=\"enable-prometheus-integragration-on-cloudstack-management-server\"\u003eEnable prometheus integragration on Cloudstack Management server\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eEnable prometheus plugin in Cloudstack Management server\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eLogin to the database or enable the following global setting parameters\u003c/p\u003e\n\u003cp\u003eprometheus.exporter.enable : Enable the prometheus exporter plugin, management server restart needed.\nprometheus.exporter.allowed.ips: List of comma separated prometheus server ips (with no spaces) that should be allowed to access the metrics endpoint.\u003c/p\u003e","title":"Monitoring Apache Cloudstack with Prometheus and Grafana"},{"content":"Building cloudstack on Ubuntu 22.0.4\nApache 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.\nhttps://cloudstack.apache.org/ http://docs.cloudstack.apache.org/en/latest/\nInstall 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\nif command -v pyenv 1\u0026gt;/dev/null 2\u0026gt;\u0026amp;1; then eval \u0026#34;$(pyenv init -)\u0026#34; fi Make sure to install python version 3.8.10 in order to run some sample tests pyenv versions pyenv install 3.8.10 pyenv global 3.8.10 check the version of python and python3\npython --version python3 --version Verify if java is installed java --version ❯ java --version openjdk 11.0.19 2023-04-18 OpenJDK Runtime Environment Temurin-11.0.19+7 (build 11.0.19+7) OpenJDK 64-Bit Server VM Temurin-11.0.19+7 (build 11.0.19+7, mixed mode) Verify if Maven is installed Download the maven from\nhttps://maven.apache.org/download.cgi\ntar -xvf apache-maven-3.9.1-bin.tar.gz mv apache-maven-3.9.1 /usr/local/bin/ In .zshrc file add the following line\nexport PATH=\u0026#34;/usr/local/bin/apache-maven-3.9.1/bin:${PATH}\u0026#34; mvn --version Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8) Maven home: /usr/local/bin/apache-maven-3.9.1 Java version: 11.0.19, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home Default locale: en_IN, platform encoding: UTF-8 OS name: \u0026#34;mac os x\u0026#34;, version: \u0026#34;13.2.1\u0026#34;, arch: \u0026#34;aarch64\u0026#34;, family: \u0026#34;mac\u0026#34; Configure mysql vi /etc/mysql/mysql.conf.d/mysqld.cnf [mysqld] sql-mode=\u0026#34;STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION\u0026#34; server_id = 1 innodb_rollback_on_timeout=1 innodb_lock_wait_timeout=600 max_connections=1000 log-bin=mysql-bin binlog-format = \u0026#39;ROW\u0026#39; # add the following for MySQL 8.x default-authentication-plugin=mysql_native_password Change the password of mysql user sudo mysql -u root -e \u0026#34;ALTER USER \u0026#39;root\u0026#39;@\u0026#39;localhost\u0026#39; IDENTIFIED WITH mysql_native_password BY \u0026#39;\u0026#39;\u0026#34; Install the Noredist CloudStack builds requires additional jars git clone \u0026#34;https://github.com/shapeblue/cloudstack-nonoss cd cloudstack-nonoss bash -x install-non-oss.sh Building Cloudstack and running the maangement server git clone \u0026#34;https://github.com/apache/cloudstack\u0026#34; To build specific version of cloudstack git checkout 4.17.2 cd cloudstack To build specific version of cloudstack git checkout 4.17.2 vi .python-version 3.8.10 mvn clean install -Dnoredist -P developer,systemvm mvn -Pdeveloper -pl developer -Ddeploydb Run the management server mvn -pl :cloud-client-ui jetty:run -Dnoredist -Djava.net.preferIPv4Stack=true or mvn -pl :cloud-client-ui jetty:run -Dnoredist -Djava.net.preferIPv4Stack=true-Djdk.net.URLClassPath.disableClassPathURLCheck=true Building Cloudstack simulator and running it mvn clean install -Dsimulator -P developer,systemvm mvn -Pdeveloper -pl developer -Ddeploydb mvn -Pdeveloper -pl developer -Ddeploydb-simulator mvn -pl :cloud-client-ui jetty:run -Djava.net.preferIPv4Stack=true -Dsimulator Running Cloudstack UI curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash nvm install v14 node -v v14.21.3 npm -v 6.14.18 cd cloudstack/ui npm install npm run serve Deploying resources and running Test $ pip3 install --upgrade tools/marvin/dist/Marvin-*.tar.gz $ python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advanced.cfg $nosetests -v --with-marvin --marvin-config=setup/dev/advanced.cfg --with-xunit --xunit-file=xunit.xml -a tags=advanced,required_hardware=false --zone=Sandbox-simulator --hypervisor=simulator test/integration/smoke/test_vm_life_cycle.py Ref Links\nhttps://collabnix.com/how-to-setup-java-on-apple-mac-m1-pro-in-2-minutes/ https://www.digitalocean.com/community/tutorials/install-maven-mac-os https://www.jenv.be/ https://maven.apache.org/download.cgi https://www.digitalocean.com/community/tutorials/install-maven-mac-os https://www.novicedev.com/blog/how-install-mysql-macos-homebrew https://justinwride.medium.com/install-node-and-npm-natively-on-apple-silicon-mac-m1-7432c826389b https://github.com/nvm-sh/nvm#install--update-script\n","permalink":"https://kiranchavala.github.io/blog/building-cloudstack-on-ubuntu-22.04/","summary":"\u003cp\u003eBuilding cloudstack on Ubuntu 22.0.4\u003c/p\u003e\n\u003cp\u003eApache 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.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://cloudstack.apache.org/\"\u003ehttps://cloudstack.apache.org/\u003c/a\u003e\n\u003ca href=\"http://docs.cloudstack.apache.org/en/latest/\"\u003ehttp://docs.cloudstack.apache.org/en/latest/\u003c/a\u003e\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eInstall the following packages\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esudo add-apt-repository universe\nsudo apt-get update\nsudo apt-get dist-upgrade\n\nsudo 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\n\u003c/code\u003e\u003c/pre\u003e\u003col start=\"2\"\u003e\n\u003cli\u003eInstall git\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eapt install git \n\u003c/code\u003e\u003c/pre\u003e\u003col start=\"3\"\u003e\n\u003cli\u003eInstall Python and pyenv ( in order to manage multiple python versions)\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ebrew install python\nbrew install pyenv\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003ePouplate the .zshrc to\u003c/p\u003e","title":"Building Cloudstack on Ubuntu 22.04"},{"content":"Building cloudstack on Mac os\nApache 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.\nhttps://cloudstack.apache.org/ http://docs.cloudstack.apache.org/en/latest/\nInstall Brew ( package manager) /bin/bash -c \u0026#34;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\u0026#34; 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\nif command -v pyenv 1\u0026gt;/dev/null 2\u0026gt;\u0026amp;1; then eval \u0026#34;$(pyenv init -)\u0026#34; fi Make sure to install python version 3.8.10 in order to run some sample tests pyenv versions pyenv install 3.8.10 pyenv global 3.8.10 check the version of python and python3\npython --version python3 --version Install java runtime brew install --cask temurin brew tap homebrew/cask-versions sudo softwareupdate --install-rosetta brew install --cask temurin11 In .zshrc file add the following line\nexport PATH=\u0026#34;/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/bin:${PATH} Verify the java version\njava --version ❯ java --version openjdk 11.0.19 2023-04-18 OpenJDK Runtime Environment Temurin-11.0.19+7 (build 11.0.19+7) OpenJDK 64-Bit Server VM Temurin-11.0.19+7 (build 11.0.19+7, mixed mode) Install Maven Download the maven from\nhttps://maven.apache.org/download.cgi\ntar -xvf apache-maven-3.9.1-bin.tar.gz mv apache-maven-3.9.1 /usr/local/bin/ In .zshrc file add the following line\nexport PATH=\u0026#34;/usr/local/bin/apache-maven-3.9.1/bin:${PATH}\u0026#34; mvn --version Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8) Maven home: /usr/local/bin/apache-maven-3.9.1 Java version: 11.0.19, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home Default locale: en_IN, platform encoding: UTF-8 OS name: \u0026#34;mac os x\u0026#34;, version: \u0026#34;13.2.1\u0026#34;, arch: \u0026#34;aarch64\u0026#34;, family: \u0026#34;mac\u0026#34; Install mysql brew install mysql vi /opt/homebrew/etc/my.cnf sql-mode=\u0026#34;STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION\u0026#34; server_id = 1 innodb_rollback_on_timeout=1 innodb_lock_wait_timeout=600 max_connections=1000 log-bin=mysql-bin binlog-format = \u0026#39;ROW\u0026#39; # add the following for MySQL 8.x default-authentication-plugin=mysql_native_password brew services start mysql Install the Noredist CloudStack builds requires additional jars git clone \u0026#34;https://github.com/shapeblue/cloudstack-nonoss cd cloudstack-nonoss bash -x install-non-oss.sh Building Cloudstack and running the maangement server git clone \u0026#34;https://github.com/apache/cloudstack\u0026#34; To build specific version of cloudstack git checkout 4.17.2 cd cloudstack To build specific version of cloudstack git checkout 4.17.2 vi .python-version 3.8.10 mvn clean install -Dnoredist -P developer,systemvm mvn -Pdeveloper -pl developer -Ddeploydb Run the management server mvn -pl :cloud-client-ui jetty:run -Dnoredist -Djava.net.preferIPv4Stack=true or mvn -pl :cloud-client-ui jetty:run -Dnoredist -Djava.net.preferIPv4Stack=true-Djdk.net.URLClassPath.disableClassPathURLCheck=true Building Cloudstack simulator and running it mvn clean install -Dsimulator -P developer,systemvm mvn -Pdeveloper -pl developer -Ddeploydb mvn -Pdeveloper -pl developer -Ddeploydb-simulator mvn -pl :cloud-client-ui jetty:run -Djava.net.preferIPv4Stack=true -Dsimulator Running Cloudstack UI curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash nvm install v14 node -v v14.21.3 npm -v 6.14.18 cd cloudstack/ui npm install npm run serve Deploying resources and running Test $ pip3 install --upgrade tools/marvin/dist/Marvin-*.tar.gz $ python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advanced.cfg $nosetests -v --with-marvin --marvin-config=setup/dev/advanced.cfg --with-xunit --xunit-file=xunit.xml -a tags=advanced,required_hardware=false --zone=Sandbox-simulator --hypervisor=simulator test/integration/smoke/test_vm_life_cycle.py Ref Links\nhttps://collabnix.com/how-to-setup-java-on-apple-mac-m1-pro-in-2-minutes/ https://www.digitalocean.com/community/tutorials/install-maven-mac-os https://www.jenv.be/ https://maven.apache.org/download.cgi https://www.digitalocean.com/community/tutorials/install-maven-mac-os https://www.novicedev.com/blog/how-install-mysql-macos-homebrew https://justinwride.medium.com/install-node-and-npm-natively-on-apple-silicon-mac-m1-7432c826389b https://github.com/nvm-sh/nvm#install--update-script\n","permalink":"https://kiranchavala.github.io/blog/building-cloudstack-on-mac-os/","summary":"\u003cp\u003eBuilding cloudstack on Mac os\u003c/p\u003e\n\u003cp\u003eApache 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.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://cloudstack.apache.org/\"\u003ehttps://cloudstack.apache.org/\u003c/a\u003e\n\u003ca href=\"http://docs.cloudstack.apache.org/en/latest/\"\u003ehttp://docs.cloudstack.apache.org/en/latest/\u003c/a\u003e\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eInstall Brew ( package manager)\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e/bin/bash -c \u0026#34;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\u0026#34;\n\u003c/code\u003e\u003c/pre\u003e\u003col start=\"2\"\u003e\n\u003cli\u003eInstall git\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ebrew install git \n\u003c/code\u003e\u003c/pre\u003e\u003col start=\"3\"\u003e\n\u003cli\u003eInstall Python and pyenv ( in order to manage multiple python versions)\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ebrew install python\nbrew install pyenv\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003ePouplate the .zshrc to\u003c/p\u003e","title":"Building Cloudstack on Mac Os"},{"content":" Launch any linux vm (Centos, Ubuntu etc) from a iso\nInstall the cloud init package\nRHEL: yum install cloud-init\nUbuntu : apt-get install cloud-init\nConfigure the cloud init by adding the cloudstack datasource package vi /etc/cloud/cloud.cfg.d/99_cloudstack.cfg\ndatasource_list: [ CloudStack, None ]\nCreate a template of the disk\nLaunch a vm based on the template created and pass the userdata parameter\ndeploy 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=\nNote: 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\nhttps://www.base64encode.org/\nFor example the following data is encoded\n#cloud-config runcmd:\nmkdir /run/kiran echo kiran says hi \u0026raquo; /run/kiran/sample.txt [ /root/sureedge_server_utility_installer.sh \u0026ndash;token 1466CB157777BB72 ] I2Nsb3VkLWNvbmZpZwpydW5jbWQ6CiAgLSBta2RpciAvcnVuL2tpcmFuCiAgLSBlY2hvIGtpcmFuIHNheXMgaGkgPj4gL3J1bi9raXJhbi9zYW1wbGUudHh0CiAgLSBbIHNoLCAteGMsICAvcm9vdC9zdXJlZWRnZV9zZXJ2ZXJfdXRpbGl0eV9pbnN0YWxsZXIuc2ggLS10b2tlbiAxNDY2Q0IxNTc3NzdCQjcyIF0=\nTo trouble shoot the logs tailf /var/log/cloud-init.log\ncat /var/run/cloud-init/result.json\nThe runcmd is stored at\ncat /var/lib/cloud/instance/scripts/runcmd\nIn summary, CloudInit takes the user data passed to the vm and executes the instructions at boot time\nRef:\nhttps://www.ibm.com/docs/en/cic/1.1.2?topic=zvm-installation-configuration-cloud-init-linux-server\nhttps://cloudinit.readthedocs.io/en/latest/topics/examples.html\nhttps://www.digitalocean.com/community/tutorials/an-introduction-to-cloud-config-scripting https://www.digitalocean.com/community/tutorials/how-to-use-cloud-config-for-your-initial-server-setup\nhttps://ibm.github.io/cloud-enterprise-examples/iac-conf-mgmt/user-data/ https://www.ibm.com/docs/en/cic/1.1.0?topic=solutions-failed-ssh-deployed-vm-correct-usernamepassword\nhttps://cloudinit.readthedocs.io/en/latest/topics/datasources/cloudstack.html\nhttps://docs.cloudstack.apache.org/en/latest/adminguide/virtual_machines.html#using-cloud-init\n","permalink":"https://kiranchavala.github.io/blog/using-cloud-init-in-cloudstack/","summary":"\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eLaunch any linux vm (Centos, Ubuntu etc) from a iso\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eInstall the cloud init package\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eRHEL: yum install cloud-init\u003c/p\u003e\n\u003cp\u003eUbuntu : apt-get install cloud-init\u003c/p\u003e\n\u003col start=\"3\"\u003e\n\u003cli\u003eConfigure the cloud init by adding the cloudstack datasource package\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003evi /etc/cloud/cloud.cfg.d/99_cloudstack.cfg\u003c/p\u003e\n\u003cp\u003edatasource_list: [ CloudStack, None ]\u003c/p\u003e\n\u003col start=\"4\"\u003e\n\u003cli\u003e\n\u003cp\u003eCreate a template of the disk\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eLaunch a vm based on the template created and  pass the userdata parameter\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003edeploy 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=\u003c/p\u003e\n\u003cp\u003eNote: 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\u003c/p\u003e","title":"Using Cloudinit in Cloudstack"},{"content":"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 \u0026ldquo;golden images\u0026rdquo; that teams across an organization can use in cloud infrastructure.\nThere 2 ways to write the packer code to build the image\nUsing JSON formatted code Using HCL2 formatted code In order to interact with Google cloud we have to create a service account in GCP\nCreate a service account in google cloud, we will use the service account to deploy the images in Google cloud Identify the project associated with your google cloud account\n~❯ gcloud config get-value project terraform-325207 Replace the project id in the below commands 1 .gcloud iam service-accounts create packer --project terraform-325207 --description=\u0026#34;Packer Service Account\u0026#34; --display-name=\u0026#34;Packer Service Account\u0026#34; Created service account [packer] 2. gcloud projects add-iam-policy-binding terraform-325207 --member=serviceAccount:packer@terraform-325207.iam.gserviceaccount.com --role=roles/compute.instanceAdmin.v1 Updated IAM policy for project [terraform-325207]. bindings: - members: - serviceAccount:packer@terraform-325207.iam.gserviceaccount.com role: roles/compute.instanceAdmin.v1 - members: - serviceAccount:service-1065616354729@compute-system.iam.gserviceaccount.com role: roles/compute.serviceAgent - members: - serviceAccount:1065616354729-compute@developer.gserviceaccount.com - serviceAccount:1065616354729@cloudservices.gserviceaccount.com role: roles/editor - members: - user:kiran.sit@gmail.com role: roles/owner etag: BwXQ5hY047U= version: 1 3. gcloud projects add-iam-policy-binding terraform-325207 --member=serviceAccount:packer@terraform-325207.iam.gserviceaccount.com --role=roles/iam.serviceAccountUser Updated IAM policy for project [terraform-325207]. bindings: - members: - serviceAccount:packer@terraform-325207.iam.gserviceaccount.com role: roles/compute.instanceAdmin.v1 - members: - serviceAccount:service-1065616354729@compute-system.iam.gserviceaccount.com role: roles/compute.serviceAgent - members: - serviceAccount:1065616354729-compute@developer.gserviceaccount.com - serviceAccount:1065616354729@cloudservices.gserviceaccount.com role: roles/editor - members: - serviceAccount:packer@terraform-325207.iam.gserviceaccount.com role: roles/iam.serviceAccountUser - members: - user:kiran.sit@gmail.com role: roles/owner etag: BwXQ5iqxahY= version: 1 4. gcloud projects add-iam-policy-binding terraform-325207 --member=serviceAccount:packer@terraform-325207.iam.gserviceaccount.com --role=roles/iap.tunnelResourceAccessor Updated IAM policy for project [terraform-325207]. bindings: - members: - serviceAccount:packer@terraform-325207.iam.gserviceaccount.com role: roles/compute.instanceAdmin.v1 - members: - serviceAccount:service-1065616354729@compute-system.iam.gserviceaccount.com role: roles/compute.serviceAgent - members: - serviceAccount:1065616354729-compute@developer.gserviceaccount.com - serviceAccount:1065616354729@cloudservices.gserviceaccount.com role: roles/editor - members: - serviceAccount:packer@terraform-325207.iam.gserviceaccount.com role: roles/iam.serviceAccountUser - members: - serviceAccount:packer@terraform-325207.iam.gserviceaccount.com role: roles/iap.tunnelResourceAccessor - members: - user:kiran.sit@gmail.com role: roles/owner etag: BwXQ5jBDseY= version: 1 Create an API key for the service account Home\u0026gt;IAM \u0026gt;Service account\u0026gt; click on the service account \u0026gt; ADD key \u0026gt; Save the json file in the folder\nUsing json format to create an image in Google cloud\n~❯ mkdir -p packer_templates ~❯ cd packer_templates ~❯ mkdir -p gcp ~❯ vi gcp-webserver.json { \u0026#34;builders\u0026#34;: [{ \u0026#34;type\u0026#34;: \u0026#34;googlecompute\u0026#34;, \u0026#34;account_file\u0026#34;: \u0026#34;terraform-325207-39ea61c5c3ce.json\u0026#34;, \u0026#34;project_id\u0026#34;: \u0026#34;terraform-325207\u0026#34;, \u0026#34;source_image\u0026#34;: \u0026#34;ubuntu-1804-bionic-v20211021\u0026#34;, \u0026#34;ssh_username\u0026#34;: \u0026#34;packer\u0026#34;, \u0026#34;zone\u0026#34;: \u0026#34;us-central1-a\u0026#34;, \u0026#34;region\u0026#34;: \u0026#34;us-central1\u0026#34;, \u0026#34;machine_type\u0026#34;: \u0026#34;n1-standard-1\u0026#34;, \u0026#34;image_description\u0026#34;: \u0026#34;custom machine image\u0026#34;, \u0026#34;image_name\u0026#34;: \u0026#34;mypackerimage\u0026#34;, \u0026#34;disk_size\u0026#34;: 10, \u0026#34;network\u0026#34;: \u0026#34;kiran-vpc2\u0026#34;, \u0026#34;subnetwork\u0026#34;: \u0026#34;kiran-vpc2\u0026#34; }], \u0026#34;provisioners\u0026#34;: [ { \u0026#34;type\u0026#34;: \u0026#34;file\u0026#34;, \u0026#34;source\u0026#34;: \u0026#34;index.html\u0026#34;, \u0026#34;destination\u0026#34;: \u0026#34;/tmp/index.html\u0026#34; }, { \u0026#34;type\u0026#34;: \u0026#34;shell\u0026#34;, \u0026#34;scripts\u0026#34;: [ \u0026#34;install.sh\u0026#34;, \u0026#34;post-install.sh\u0026#34; ] } ] } ~❯ vi install.sh #!/bin/sh -x # Install nginx sudo apt-get -yqq install nginx # Create website directory sudo mkdir -p /var/www/website # Move index.html to directory sudo mv /tmp/index.html /var/www/website/ ~❯ cat post-install.sh #!/bin/sh -x # Run nginx at boot sudo systemctl enable nginx ~❯ cat index.html \u0026lt;html\u0026gt; \u0026lt;head\u0026gt; \u0026lt;title\u0026gt;This is a website\u0026lt;/title\u0026gt; \u0026lt;/head\u0026gt; \u0026lt;body\u0026gt; \u0026lt;h1\u0026gt;This is a website\u0026lt;/h1\u0026gt; \u0026lt;/body\u0026gt; \u0026lt;/html Validate the code\n~/packer_templates/gcp ❯ packer validate gcp-webserver.json The configuration is valid. Build The image\n~/packer_templates/gcp ❯ packer build gcp-webserver.json\nUsing HCL 2 format to create an image in Google cloud\n~❯vi gcp-webserver.pkr.hcl packer { required_plugins { googlecompute = { version = \u0026#34;\u0026gt;= 0.0.1\u0026#34; source = \u0026#34;github.com/hashicorp/googlecompute\u0026#34; } } } source \u0026#34;googlecompute\u0026#34; \u0026#34;ubuntu\u0026#34; { account_file = \u0026#34;terraform-325207-39ea61c5c3ce.json\u0026#34; project_id = \u0026#34;terraform-325207\u0026#34; source_image = \u0026#34;ubuntu-1804-bionic-v20211021\u0026#34; ssh_username = \u0026#34;packer\u0026#34; zone =\u0026#34;us-central1-a\u0026#34; region = \u0026#34;us-central1\u0026#34; machine_type = \u0026#34;n1-standard-1\u0026#34; image_description = \u0026#34;custom machine image\u0026#34; image_name = \u0026#34;mypackerimage\u0026#34; disk_size = 10 network = \u0026#34;kiran-vpc2\u0026#34; subnetwork = \u0026#34;kiran-vpc2\u0026#34; } build { sources = [\u0026#34;sources.googlecompute.ubuntu\u0026#34;] provisioner \u0026#34;file\u0026#34; { destination = \u0026#34;/tmp/index.html\u0026#34; source = \u0026#34;index.html\u0026#34; } provisioner \u0026#34;shell\u0026#34; { scripts = [\u0026#34;install.sh\u0026#34;, \u0026#34;post-install.sh\u0026#34;] } } Validate the code\n~/packer_templates/gcp ❯ packer validate gcp-webserver.pkr.hcl The configuration is valid. Initialize Packer configuration\n~/packer_templates/gcp ❯ packer init . Installed plugin github.com/hashicorp/googlecompute v1.0.6 in \u0026#34;/opt/homebrew/bin/github.com/hashicorp/googlecompute/packer-plugin-googlecompute_v1.0.6_x5.0_darwin_arm64\u0026#34; Build the Image\n~/packer_templates/gcp ❯ packer build gcp-webserver.pkr.hcl googlecompute.ubuntu: output will be in this color. ==\u0026gt; googlecompute.ubuntu: Checking image does not exist... ==\u0026gt; googlecompute.ubuntu: Creating temporary RSA SSH key for instance... ==\u0026gt; googlecompute.ubuntu: Using image: ubuntu-1804-bionic-v20211021 ==\u0026gt; googlecompute.ubuntu: Creating instance... googlecompute.ubuntu: Loading zone: us-central1-a googlecompute.ubuntu: Loading machine type: n1-standard-1 googlecompute.ubuntu: Requesting instance creation... googlecompute.ubuntu: Waiting for creation operation to complete... googlecompute.ubuntu: Instance has been created! ==\u0026gt; googlecompute.ubuntu: Waiting for the instance to become running... googlecompute.ubuntu: IP: 34.121.55.19 ==\u0026gt; googlecompute.ubuntu: Using SSH communicator to connect: 34.121.55.19 ==\u0026gt; googlecompute.ubuntu: Waiting for SSH to become available... ==\u0026gt; googlecompute.ubuntu: Connected to SSH! ==\u0026gt; googlecompute.ubuntu: Uploading index.html =\u0026gt; /tmp/index.html googlecompute.ubuntu: index.html 119 B / 119 B [======================================================================================================================================================================] 100.00% 1s ==\u0026gt; googlecompute.ubuntu: Provisioning with shell script: install.sh ==\u0026gt; googlecompute.ubuntu: + sudo apt-get -yqq install nginx ==\u0026gt; googlecompute.ubuntu: debconf: unable to initialize frontend: Dialog ==\u0026gt; googlecompute.ubuntu: debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) ==\u0026gt; googlecompute.ubuntu: debconf: falling back to frontend: Readline ==\u0026gt; googlecompute.ubuntu: debconf: unable to initialize frontend: Readline ==\u0026gt; googlecompute.ubuntu: debconf: (This frontend requires a controlling tty.) ==\u0026gt; googlecompute.ubuntu: debconf: falling back to frontend: Teletype ==\u0026gt; googlecompute.ubuntu: dpkg-preconfigure: unable to re-open stdin: googlecompute.ubuntu: Selecting previously unselected package libjpeg-turbo8:amd64. googlecompute.ubuntu: (Reading database ... 65629 files and directories currently installed.) googlecompute.ubuntu: Preparing to unpack .../00-libjpeg-turbo8_1.5.2-0ubuntu5.18.04.4_amd64.deb ... googlecompute.ubuntu: Unpacking libjpeg-turbo8:amd64 (1.5.2-0ubuntu5.18.04.4) ... googlecompute.ubuntu: Selecting previously unselected package fonts-dejavu-core. googlecompute.ubuntu: Preparing to unpack .../01-fonts-dejavu-core_2.37-1_all.deb ... googlecompute.ubuntu: Unpacking fonts-dejavu-core (2.37-1) ... googlecompute.ubuntu: Selecting previously unselected package fontconfig-config. googlecompute.ubuntu: Preparing to unpack .../02-fontconfig-config_2.12.6-0ubuntu2_all.deb ... googlecompute.ubuntu: Unpacking fontconfig-config (2.12.6-0ubuntu2) ... googlecompute.ubuntu: Selecting previously unselected package libfontconfig1:amd64. googlecompute.ubuntu: Preparing to unpack .../03-libfontconfig1_2.12.6-0ubuntu2_amd64.deb ... googlecompute.ubuntu: Unpacking libfontconfig1:amd64 (2.12.6-0ubuntu2) ... googlecompute.ubuntu: Selecting previously unselected package libjpeg8:amd64. googlecompute.ubuntu: Preparing to unpack .../04-libjpeg8_8c-2ubuntu8_amd64.deb ... googlecompute.ubuntu: Unpacking libjpeg8:amd64 (8c-2ubuntu8) ... googlecompute.ubuntu: Selecting previously unselected package libjbig0:amd64. googlecompute.ubuntu: Preparing to unpack .../05-libjbig0_2.1-3.1build1_amd64.deb ... googlecompute.ubuntu: Unpacking libjbig0:amd64 (2.1-3.1build1) ... googlecompute.ubuntu: Selecting previously unselected package libtiff5:amd64. googlecompute.ubuntu: Preparing to unpack .../06-libtiff5_4.0.9-5ubuntu0.4_amd64.deb ... googlecompute.ubuntu: Unpacking libtiff5:amd64 (4.0.9-5ubuntu0.4) ... googlecompute.ubuntu: Selecting previously unselected package libwebp6:amd64. googlecompute.ubuntu: Preparing to unpack .../07-libwebp6_0.6.1-2ubuntu0.18.04.1_amd64.deb ... googlecompute.ubuntu: Unpacking libwebp6:amd64 (0.6.1-2ubuntu0.18.04.1) ... googlecompute.ubuntu: Selecting previously unselected package libxpm4:amd64. googlecompute.ubuntu: Preparing to unpack .../08-libxpm4_1%3a3.5.12-1_amd64.deb ... googlecompute.ubuntu: Unpacking libxpm4:amd64 (1:3.5.12-1) ... googlecompute.ubuntu: Selecting previously unselected package libgd3:amd64. googlecompute.ubuntu: Preparing to unpack .../09-libgd3_2.2.5-4ubuntu0.5_amd64.deb ... googlecompute.ubuntu: Unpacking libgd3:amd64 (2.2.5-4ubuntu0.5) ... googlecompute.ubuntu: Selecting previously unselected package nginx-common. googlecompute.ubuntu: Preparing to unpack .../10-nginx-common_1.14.0-0ubuntu1.9_all.deb ... googlecompute.ubuntu: Unpacking nginx-common (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Selecting previously unselected package libnginx-mod-http-geoip. googlecompute.ubuntu: Preparing to unpack .../11-libnginx-mod-http-geoip_1.14.0-0ubuntu1.9_amd64.deb ... googlecompute.ubuntu: Unpacking libnginx-mod-http-geoip (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Selecting previously unselected package libnginx-mod-http-image-filter. googlecompute.ubuntu: Preparing to unpack .../12-libnginx-mod-http-image-filter_1.14.0-0ubuntu1.9_amd64.deb ... googlecompute.ubuntu: Unpacking libnginx-mod-http-image-filter (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Selecting previously unselected package libnginx-mod-http-xslt-filter. googlecompute.ubuntu: Preparing to unpack .../13-libnginx-mod-http-xslt-filter_1.14.0-0ubuntu1.9_amd64.deb ... googlecompute.ubuntu: Unpacking libnginx-mod-http-xslt-filter (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Selecting previously unselected package libnginx-mod-mail. googlecompute.ubuntu: Preparing to unpack .../14-libnginx-mod-mail_1.14.0-0ubuntu1.9_amd64.deb ... googlecompute.ubuntu: Unpacking libnginx-mod-mail (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Selecting previously unselected package libnginx-mod-stream. googlecompute.ubuntu: Preparing to unpack .../15-libnginx-mod-stream_1.14.0-0ubuntu1.9_amd64.deb ... googlecompute.ubuntu: Unpacking libnginx-mod-stream (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Selecting previously unselected package nginx-core. googlecompute.ubuntu: Preparing to unpack .../16-nginx-core_1.14.0-0ubuntu1.9_amd64.deb ... googlecompute.ubuntu: Unpacking nginx-core (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Selecting previously unselected package nginx. googlecompute.ubuntu: Preparing to unpack .../17-nginx_1.14.0-0ubuntu1.9_all.deb ... googlecompute.ubuntu: Unpacking nginx (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Setting up libjbig0:amd64 (2.1-3.1build1) ... googlecompute.ubuntu: Setting up fonts-dejavu-core (2.37-1) ... googlecompute.ubuntu: Setting up nginx-common (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: debconf: unable to initialize frontend: Dialog googlecompute.ubuntu: debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) googlecompute.ubuntu: debconf: falling back to frontend: Readline googlecompute.ubuntu: Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /lib/systemd/system/nginx.service. googlecompute.ubuntu: Setting up libjpeg-turbo8:amd64 (1.5.2-0ubuntu5.18.04.4) ... googlecompute.ubuntu: Setting up libnginx-mod-mail (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Setting up libxpm4:amd64 (1:3.5.12-1) ... googlecompute.ubuntu: Setting up libnginx-mod-http-xslt-filter (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Setting up libnginx-mod-http-geoip (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Setting up libwebp6:amd64 (0.6.1-2ubuntu0.18.04.1) ... googlecompute.ubuntu: Setting up libjpeg8:amd64 (8c-2ubuntu8) ... googlecompute.ubuntu: Setting up fontconfig-config (2.12.6-0ubuntu2) ... googlecompute.ubuntu: Setting up libnginx-mod-stream (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Setting up libtiff5:amd64 (4.0.9-5ubuntu0.4) ... googlecompute.ubuntu: Setting up libfontconfig1:amd64 (2.12.6-0ubuntu2) ... googlecompute.ubuntu: Setting up libgd3:amd64 (2.2.5-4ubuntu0.5) ... googlecompute.ubuntu: Setting up libnginx-mod-http-image-filter (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Setting up nginx-core (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Setting up nginx (1.14.0-0ubuntu1.9) ... googlecompute.ubuntu: Processing triggers for systemd (237-3ubuntu10.52) ... googlecompute.ubuntu: Processing triggers for man-db (2.8.3-2ubuntu0.1) ... googlecompute.ubuntu: Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ... googlecompute.ubuntu: Processing triggers for ureadahead (0.100.0-21) ... googlecompute.ubuntu: Processing triggers for libc-bin (2.27-3ubuntu1.4) ... ==\u0026gt; googlecompute.ubuntu: + sudo mkdir -p /var/www/website ==\u0026gt; googlecompute.ubuntu: + sudo mv /tmp/index.html /var/www/website/ ==\u0026gt; googlecompute.ubuntu: Provisioning with shell script: post-install.sh ==\u0026gt; googlecompute.ubuntu: + sudo systemctl enable nginx ==\u0026gt; googlecompute.ubuntu: Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install. ==\u0026gt; googlecompute.ubuntu: Executing: /lib/systemd/systemd-sysv-install enable nginx ==\u0026gt; googlecompute.ubuntu: Deleting instance... googlecompute.ubuntu: Instance has been deleted! ==\u0026gt; googlecompute.ubuntu: Creating image... ==\u0026gt; googlecompute.ubuntu: Deleting disk... googlecompute.ubuntu: Disk has been deleted! Build \u0026#39;googlecompute.ubuntu\u0026#39; finished after 2 minutes 43 seconds. ==\u0026gt; Wait completed after 2 minutes 43 seconds ==\u0026gt; Builds finished. The artifacts of successful builds are: --\u0026gt; googlecompute.ubuntu: A disk image was created: mypackerimage Ref: https://blog.searce.com/build-machine-images-with-packer-on-google-cloud-platform-b43f77f1acd https://www.packer.io/docs/builders/googlecompute\nhttps://www.youtube.com/watch?v=lSumUuZT_B8\u0026amp;t=943s\n","permalink":"https://kiranchavala.github.io/blog/using-packer-to-deploy-a-image-on-google-cloud/","summary":"\u003cp\u003ePacker 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 \u0026ldquo;golden images\u0026rdquo; that teams across an organization can use in cloud infrastructure.\u003c/p\u003e\n\u003cp\u003eThere 2 ways to write the packer code to build the image\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e Using JSON formatted code\n Using HCL2 formatted code\n\u003c/code\u003e\u003c/pre\u003e\n\u003chr\u003e\n\u003cp\u003eIn order to interact with Google cloud we have to create a service account in GCP\u003c/p\u003e","title":"Using Packer to deploy a image on Google Cloud"},{"content":" Install virtual box sudo apt install virtualbox\nInstall vagrant curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -\nsudo apt-add-repository \u0026ldquo;deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main\u0026rdquo;\nsudo apt-get update \u0026amp;\u0026amp; sudo apt-get install vagrant\nGit clone this repository git clone https://github.com/justmeandopensource/kubernetes\ncd vagrant-provisioning\nvagrant up\nThis is going to create 1 master node with 2 worker nodes\n","permalink":"https://kiranchavala.github.io/blog/creating-kubernetes-cluster-via-vagrant/","summary":"\u003col\u003e\n\u003cli\u003eInstall virtual box\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003esudo apt install virtualbox\u003c/p\u003e\n\u003col start=\"2\"\u003e\n\u003cli\u003eInstall vagrant\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003ecurl -fsSL \u003ca href=\"https://apt.releases.hashicorp.com/gpg\"\u003ehttps://apt.releases.hashicorp.com/gpg\u003c/a\u003e | sudo apt-key add -\u003c/p\u003e\n\u003cp\u003esudo apt-add-repository \u0026ldquo;deb [arch=amd64] \u003ca href=\"https://apt.releases.hashicorp.com\"\u003ehttps://apt.releases.hashicorp.com\u003c/a\u003e $(lsb_release -cs) main\u0026rdquo;\u003c/p\u003e\n\u003cp\u003esudo apt-get update \u0026amp;\u0026amp; sudo apt-get install vagrant\u003c/p\u003e\n\u003col start=\"3\"\u003e\n\u003cli\u003eGit clone this repository\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003egit clone \u003ca href=\"https://github.com/justmeandopensource/kubernetes\"\u003ehttps://github.com/justmeandopensource/kubernetes\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003ecd vagrant-provisioning\u003c/p\u003e\n\u003cp\u003evagrant up\u003c/p\u003e\n\u003cp\u003eThis is going to create 1 master node with 2 worker nodes\u003c/p\u003e","title":"Creating Kubernetes Cluster via Vagrant"},{"content":"There could be scenarios where you want to import the already existing resources from cloud providers into terraform.\nTerraform has an import modude which does this job and using the module is a tedious process\nhttps://www.terraform.io/docs/cli/import/index.html\nThere is tool called Terraformer which does the job of reverese terraforming\nhttps://github.com/GoogleCloudPlatform/terraformer\nGoogle cloud https://gist.github.com/kiranchavala/54a930c8da148cc2b637c053dc1ba8ba\nAWS https://gist.github.com/kiranchavala/c2a01a7a43ea15cb8921a710d6cf22ea\nAzure https://gist.github.com/kiranchavala/18a1c555c198eb0944cbad3791602dc7\nOpenstack https://gist.github.com/kiranchavala/c63243b0b76adcdafc7d06d87a304370\nCloudstack https://gist.github.com/kiranchavala/c1b81f1d629b0567e08e219891d4ed48\n","permalink":"https://kiranchavala.github.io/blog/import-existing-resources-into-terrafrorm/","summary":"\u003cp\u003eThere could be scenarios where you want to import the already existing resources from cloud providers into terraform.\u003c/p\u003e\n\u003cp\u003eTerraform has an import modude which does this job and using the module is a tedious process\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.terraform.io/docs/cli/import/index.html\"\u003ehttps://www.terraform.io/docs/cli/import/index.html\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eThere is tool called Terraformer which does the job of reverese terraforming\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/GoogleCloudPlatform/terraformer\"\u003ehttps://github.com/GoogleCloudPlatform/terraformer\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id=\"google-cloud\"\u003eGoogle cloud\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/kiranchavala/54a930c8da148cc2b637c053dc1ba8ba\"\u003ehttps://gist.github.com/kiranchavala/54a930c8da148cc2b637c053dc1ba8ba\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id=\"aws\"\u003eAWS\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/kiranchavala/c2a01a7a43ea15cb8921a710d6cf22ea\"\u003ehttps://gist.github.com/kiranchavala/c2a01a7a43ea15cb8921a710d6cf22ea\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id=\"azure\"\u003eAzure\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/kiranchavala/18a1c555c198eb0944cbad3791602dc7\"\u003ehttps://gist.github.com/kiranchavala/18a1c555c198eb0944cbad3791602dc7\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id=\"openstack\"\u003eOpenstack\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/kiranchavala/c63243b0b76adcdafc7d06d87a304370\"\u003ehttps://gist.github.com/kiranchavala/c63243b0b76adcdafc7d06d87a304370\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id=\"cloudstack\"\u003eCloudstack\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/kiranchavala/c1b81f1d629b0567e08e219891d4ed48\"\u003ehttps://gist.github.com/kiranchavala/c1b81f1d629b0567e08e219891d4ed48\u003c/a\u003e\u003c/p\u003e","title":"Import Existing Resources into Terrafrorm"},{"content":"In order to quicly bring up a new kubernetes cluster in your local laptop, then you can use kind.\nKind ( Kubernetes in Docker)\nKind basically creates the nodes as a containers and create a kubernetes cluster\nhttps://kind.sigs.k8s.io/\nhttps://github.com/kubernetes-sigs/kind\nbrew install kind Deploying a Single node cluster kind create cluster docker images kindest/node \u0026lt;none\u0026gt; d372b674475a 3 months ago 1.1GB docker ps -a 3047fe4988f4 kindest/node:v1.21.1 \u0026#34;/usr/local/bin/entr…\u0026#34; 8 days ago Up 8 days 127.0.0.1:50941-\u0026gt;6443/tcp kind-control-plane docker exec -it kind-control-plane sh # crictl ps -a CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID be7d88399e276 1a1f05a2cd7c2 8 days ago Running coredns 0 bb3eb2d8b0138 dc91af853f8d4 1a1f05a2cd7c2 8 days ago Running coredns 0 72e459f147b24 2bcbac91131f1 2b703ea309660 8 days ago Running local-path-provisioner 0 1b9b5b3329128 3787410dc6121 f37b7c809e5dc 8 days ago Running kindnet-cni 0 66b72ef1c9758 af1073c036c7b 4bbef4ca108cd 8 days ago Running kube-proxy 0 e254cfacdfb75 b29d7fa01b9ea 05b738aa1bc63 8 days ago Running etcd 0 4109caeae008c cb638fbd4988d 18e61c783b417 8 days ago Running kube-apiserver 0 f87bb12d4816e 181e0b63e3db1 0c6dccae49de8 8 days ago Running kube-controller-manager 0 0d00a01acb283 ccd3b21c436ec 8c783dd252088 8 days ago Running kube-scheduler 0 72a8570b0c0b2 kubectl get cluster-info\nkubectl get nodes -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME kind-control-plane Ready control-plane,master 8d v1.21.1 172.18.0.2 \u0026lt;none\u0026gt; Ubuntu 21.04 5.10.25-linuxkit containerd://1.5.2 Creating a Cluster with a specific name kind create cluster \u0026ndash;name mycluster\n7a70b8d28e8a kindest/node:v1.21.1 \u0026#34;/usr/local/bin/entr…\u0026#34; 3 minutes ago Up 3 minutes 127.0.0.1:54053-\u0026gt;6443/tcp mycluster-control-plane 3047fe4988f4 kindest/node:v1.21.1 \u0026#34;/usr/local/bin/entr…\u0026#34; 8 days ago Up 8 days 127.0.0.1:50941-\u0026gt;6443/tcp kind-control-plane Listing the clusters kind get clusters kind mycluster\nDeleting a kind cluster kind delete cluster Deleting cluster \u0026#34;kind\u0026#34; kind delete cluster --name mycluster Deleting cluster \u0026#34;mycluster\u0026#34; Deploying multi master/worker nide kubernetes cluster https://kind.sigs.k8s.io/docs/user/quick-start/#configuring-your-kind-cluster\nkind create cluster --config /tmp/kind.yaml vi /tmp/kind.yaml kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - role: control-plane - role: control-plane - role: worker - role: worker - role: worker image: kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6 --config /tmp/kind.yaml With specific version of kubernetes https://github.com/kubernetes-sigs/kind/releases\nkind create cluster --image kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6 --config /tmp/kind.yaml Installing Metallb loadbalancer on kind https://kind.sigs.k8s.io/docs/user/loadbalancer/\nkubectl apply -f https://raw.githubusercontent.com/metallb/metallb/master/manifests/namespace.yaml kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey=\u0026#34;$(openssl rand -base64 128)\u0026#34; kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey=\u0026#34;$(openssl rand -base64 128)\u0026#34; https://www.youtube.com/watch?v=kkW7LNCsK74\n","permalink":"https://kiranchavala.github.io/blog/kind/","summary":"\u003cp\u003eIn order to quicly bring up a new kubernetes cluster in your local laptop, then you can use kind.\u003c/p\u003e\n\u003cp\u003eKind ( Kubernetes in Docker)\u003c/p\u003e\n\u003cp\u003eKind basically creates the nodes as a containers and create a kubernetes cluster\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://kind.sigs.k8s.io/\"\u003ehttps://kind.sigs.k8s.io/\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/kubernetes-sigs/kind\"\u003ehttps://github.com/kubernetes-sigs/kind\u003c/a\u003e\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ebrew install kind\n\u003c/code\u003e\u003c/pre\u003e\u003ch2 id=\"deploying-a-single-node--cluster\"\u003eDeploying a Single node  cluster\u003c/h2\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ekind create cluster \n\u003c/code\u003e\u003c/pre\u003e\u003cpre tabindex=\"0\"\u003e\u003ccode\u003edocker images\nkindest/node                            \u0026lt;none\u0026gt;                                                  d372b674475a   3 months ago    1.1GB\n\ndocker ps -a\n3047fe4988f4   kindest/node:v1.21.1   \u0026#34;/usr/local/bin/entr…\u0026#34;   8 days ago       Up 8 days       127.0.0.1:50941-\u0026gt;6443/tcp   kind-control-plane\n\ndocker exec -it kind-control-plane sh\n# crictl ps -a\nCONTAINER           IMAGE               CREATED             STATE               NAME                      ATTEMPT             POD ID\nbe7d88399e276       1a1f05a2cd7c2       8 days ago          Running             coredns                   0                   bb3eb2d8b0138\ndc91af853f8d4       1a1f05a2cd7c2       8 days ago          Running             coredns                   0                   72e459f147b24\n2bcbac91131f1       2b703ea309660       8 days ago          Running             local-path-provisioner    0                   1b9b5b3329128\n3787410dc6121       f37b7c809e5dc       8 days ago          Running             kindnet-cni               0                   66b72ef1c9758\naf1073c036c7b       4bbef4ca108cd       8 days ago          Running             kube-proxy                0                   e254cfacdfb75\nb29d7fa01b9ea       05b738aa1bc63       8 days ago          Running             etcd                      0                   4109caeae008c\ncb638fbd4988d       18e61c783b417       8 days ago          Running             kube-apiserver            0                   f87bb12d4816e\n181e0b63e3db1       0c6dccae49de8       8 days ago          Running             kube-controller-manager   0                   0d00a01acb283\nccd3b21c436ec       8c783dd252088       8 days ago          Running             kube-scheduler            0                   72a8570b0c0b2\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003ekubectl  get cluster-info\u003c/p\u003e","title":"Kind"},{"content":"With the removal docker as the default container runtime in kubernetes.\nWhen a situation arises where you need to debug the container application container\nYou can use Crictl and Nerdctl and debug the issue quickly\nCrictl\nInstall crictl VERSION=\u0026#34;v1.22.0\u0026#34; wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin Create a endpoint configuration file (crictl.yaml) Example\nTo interact with containerd runtime env cat /etc/crictl.yaml runtime-endpoint: unix:///run/containerd/containerd.sock image-endpoint: unix:///run/containerd/containerd.sock timeout: 2 debug: false pull-image-on-create: false To interact with docker runtime cat /etc/crictl.yaml runtime-endpoint: unix:///var/run/dockershim.sock image-endpoint: unix:///var/run/dockershim.sock timeout: 2 debug: false pull-image-on-create: false To interact with Crio runtime cat /etc/crictl.yaml runtime-endpoint: unix:///run/crio/crio.sock image-endpoint: unix:///run/crio/crio.sock timeout: 2 debug: false Execute the crictl commands Example:\nkiran@master1:~$ sudo crictl --help kiran@master1:~$ sudo crictl info kiran@master1:~$ sudo crictl info kiran@master1:~$ sudo crictl inspect \u0026lt;\u0026gt; kiran@master1:~$ sudo crictl pods Nerdctl\nWhile critctl is great its not compatible with Docker CLI, not friendly to users, and does not support non-CRI features\nCurrently nerdctl runs with containerd runtime\nhttps://github.com/containerd/nerdctl\nInstalling wget https://github.com/containerd/nerdctl/releases/download/v0.11.1/nerdctl-0.11.1-linux-amd64.tar.gz sudo tar Cxzvvf /usr/local/bin nerdctl-0.11.1-linux-amd64.tar.gz Commands sudo nerdctl version sudo nerdctl system info sudo nerdctl help nerdctl --namespace k8s.io ps -a nerdctl run -d --name nginx -p 8080:80 nginx:alpine nerdclt ps nerdctl logs -f \u0026lt;\u0026gt; nerdctl compose up -d nerdctl top \u0026lt;\u0026gt; nerdctl volume ls nerdctl volume inspect nerdctl network -h nerdctl port \u0026lt;\u0026gt; Ref: https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md https://kubernetes.io/docs/tasks/debug-application-cluster/crictl/\nhttps://github.com/containerd/nerdctl\nhttps://github.com/containerd/nerdctl/releases\nA good video which talks about it\n","permalink":"https://kiranchavala.github.io/blog/using-crictl-and-nerdctl/","summary":"\u003cp\u003eWith the removal docker as the default container runtime in kubernetes.\u003c/p\u003e\n\u003cp\u003eWhen a situation arises where you need to debug the container application container\u003c/p\u003e\n\u003cp\u003eYou can use Crictl and Nerdctl and debug the issue quickly\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCrictl\u003c/strong\u003e\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eInstall crictl\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eVERSION=\u0026#34;v1.22.0\u0026#34;\nwget https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz\nsudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin\n\u003c/code\u003e\u003c/pre\u003e\u003col start=\"2\"\u003e\n\u003cli\u003eCreate a endpoint configuration file (crictl.yaml)\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eExample\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eTo interact with containerd runtime env\n\ncat /etc/crictl.yaml \nruntime-endpoint: unix:///run/containerd/containerd.sock\nimage-endpoint: unix:///run/containerd/containerd.sock\ntimeout: 2\ndebug: false\npull-image-on-create: false\n\nTo interact with docker runtime\n\ncat /etc/crictl.yaml\nruntime-endpoint: unix:///var/run/dockershim.sock\nimage-endpoint: unix:///var/run/dockershim.sock\ntimeout: 2\ndebug: false\npull-image-on-create: false\n\nTo interact with Crio runtime\n\ncat /etc/crictl.yaml\nruntime-endpoint: unix:///run/crio/crio.sock\nimage-endpoint: unix:///run/crio/crio.sock\ntimeout: 2\ndebug: false\n\u003c/code\u003e\u003c/pre\u003e\u003col start=\"3\"\u003e\n\u003cli\u003eExecute the crictl commands\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eExample:\u003c/p\u003e","title":"Using crictl and nerdctl"},{"content":"Currently to access and manage xenserver cluster you need a xencenter installed in a windows system.\nThis could be a limitation for the users of linux and mac\nMeanwhile you can access vmware exsi servers and also manage the clusters of vcenter via http\nTo overcome this limitation you can use the XCP hypervisor\nXCP is open source hypervisor based on XenServer.\nDownload the XCP-ng https://xcp-ng.org/#easy-to-install\nhttps://xcp-ng.org/docs/install.html#iso-installation\nInstall the xcp-center for windows systems to access the XCP hypervisors https://github.com/xcp-ng/xenadmin/releases/\nTo manage the xenservers from Web-UI you need download the xen orchestra login and create an account to download the xva file (xenserver based virtual appliance)\nhttps://xen-orchestra.com/#!/xo-home\nhttps://xen-orchestra.com/docs/xoa.html#alternative-install\nOnce XVA file you can import it xencenter as a appliance\nFor web login\nhttps:// xva appliance ip\nDefault user is admin@admin.net with admin as a password.\nIf you want to connect to the appliance via SSH or console, the default credentials are: • user: xoa • password: xoa\nhttps://xen-orchestra.com/docs/xoa.html#alternative-install\nTo set a password for the appliance\nhttps://xen-orchestra.com/docs/troubleshooting.html#set-or-recover-xoa-vm-password\nNow all this is fine but you still need a xcp-center and windows system to access it via http\nConvert the XVA image into OVA image. https://gist.github.com/kiranchavala/a289d26017f6f7526664b70a27e85440\n","permalink":"https://kiranchavala.github.io/blog/accessing-xencenter-via-browser/","summary":"\u003cp\u003eCurrently to access and manage xenserver cluster you need a xencenter installed in a windows system.\u003c/p\u003e\n\u003cp\u003eThis could be a limitation for the users of linux and mac\u003c/p\u003e\n\u003cp\u003eMeanwhile you can access vmware exsi servers and also manage the clusters of vcenter via http\u003c/p\u003e\n\u003cp\u003eTo overcome this limitation you can use the XCP hypervisor\u003c/p\u003e\n\u003cp\u003eXCP is open source hypervisor based on XenServer.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eDownload the XCP-ng\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003ca href=\"https://xcp-ng.org/#easy-to-install\"\u003ehttps://xcp-ng.org/#easy-to-install\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://xcp-ng.org/docs/install.html#iso-installation\"\u003ehttps://xcp-ng.org/docs/install.html#iso-installation\u003c/a\u003e\u003c/p\u003e\n\u003col start=\"2\"\u003e\n\u003cli\u003eInstall the xcp-center for windows systems to access the XCP hypervisors\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/xcp-ng/xenadmin/releases/\"\u003ehttps://github.com/xcp-ng/xenadmin/releases/\u003c/a\u003e\u003c/p\u003e","title":"Accessing xencenter via browser"},{"content":"Using Elastic search is a great tool to analysze logs generated by your application\nElastic search is made up of 3 parts\nElastic search \u0026ndash;\u0026gt; the core search engine Logstah \u0026ndash;\u0026gt; to parse the logs Kibana \u0026ndash;\u0026gt; visualization Here i have imported the cloudstack management server logs to the ELK and I can perform various analytics\nFollow the below link to set up your elk infrstructure https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-18-04\nOnce done make sure your elastic, logstash, and kibana process are able to communicate with each other\nGet the logstash configuration from the following git hub repository\nThis git hub repo contains the logstash filtering for Cloudstack mangement server\nhttps://github.com/kiranchavala/logstash-cloudstack\nExample Make sure your the logstash.conf under /etc/logstash\nThe grok pattern folder is under /etc/logstash/pattern\nRun the logstash binary\n/usr/share/logstash/bin/logstash -f /etc/logstash/cloudstack.conf\nThe outputs the logs into the elastic search index and created various feilds\nSample KQL query To identify the total number of jobs of deployVirtualMachine\napi_command.keyword : deployVirtualMachine and api_command_status : START\nlog_message : \u0026ldquo;submit async job-514\u0026rdquo; or log_message : \u0026ldquo;Complete async job-514\u0026rdquo;\n","permalink":"https://kiranchavala.github.io/blog/logstash-cloudstack/","summary":"\u003cp\u003eUsing Elastic search is a great tool to analysze logs generated by your application\u003c/p\u003e\n\u003cp\u003eElastic search is made up of 3 parts\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eElastic search \u0026ndash;\u0026gt; the core search engine\u003c/li\u003e\n\u003cli\u003eLogstah \u0026ndash;\u0026gt; to parse the logs\u003c/li\u003e\n\u003cli\u003eKibana \u0026ndash;\u0026gt; visualization\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eHere i have  imported the cloudstack management server logs to the ELK and I can perform various analytics\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eFollow the below link to set up your elk infrstructure\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003ca href=\"https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-18-04\"\u003ehttps://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elastic-stack-on-ubuntu-18-04\u003c/a\u003e\u003c/p\u003e\n\u003col start=\"2\"\u003e\n\u003cli\u003e\n\u003cp\u003eOnce done make sure your elastic, logstash, and kibana process are able to communicate with each other\u003c/p\u003e","title":"Logstash Cloudstack"},{"content":"Terraform is a tool to deploy resources on cloud\nIt is an infrastructure as code tool\nGenerally the plugins are available at\nhttps://registry.terraform.io/\nTo use the plugins which are archived and not available in the terraform registry\nFollow the steps a small tweak is necessary\nCurrently the cloudstack plugin is archived https://github.com/hashicorp/terraform-provider-cloudstack\nhttps://github.com/hashicorp/terraform-provider-cloudstack/blob/stable-website/website/docs/index.html.markdown\nDownload the terrform provider for cloudstack based on the os you are running https://releases.hashicorp.com/terraform-provider-cloudstack/0.3.0/\nOn linux and mac Move it\n.terraform.d/plugins/localdomain/provider/cloudstack/0.3.0/linux_amd64\nor\n.terraform.d/plugins/localdomain/provider/cloudstack/0.3.0/darwin_amd64\nsample gist https://gist.github.com/kiranchavala/ce250d57b49ab1e8112ee0abdc64ff1c\nterraform init\nterraform apply\nuseful links\nhttps://www.youtube.com/watch?v=0O5yqQqiQRQ\u0026amp;t=746s\nhttps://www.terraform.io/docs/cli/config/config-file.html\nhttps://stackoverflow.com/questions/63365156/how-to-use-the-ibm-cloud-provider-plug-in-for-terraform-with-terraform-0-13\nhttps://www.ibm.com/cloud/blog/setting-terraform-ibm-cloud-provider-windows\nhttps://stackoverflow.com/questions/63531360/terraform-manually-installed-plugin-fails\n","permalink":"https://kiranchavala.github.io/blog/terraform-cloudstack/","summary":"\u003cp\u003eTerraform is a tool to deploy resources on cloud\u003c/p\u003e\n\u003cp\u003eIt is an infrastructure as code tool\u003c/p\u003e\n\u003cp\u003eGenerally the plugins are available at\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://registry.terraform.io/\"\u003ehttps://registry.terraform.io/\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eTo use the plugins which are archived and not available in the terraform registry\u003c/p\u003e\n\u003cp\u003eFollow the steps  a small tweak is necessary\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eCurrently the cloudstack plugin is archived\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/hashicorp/terraform-provider-cloudstack\"\u003ehttps://github.com/hashicorp/terraform-provider-cloudstack\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/hashicorp/terraform-provider-cloudstack/blob/stable-website/website/docs/index.html.markdown\"\u003ehttps://github.com/hashicorp/terraform-provider-cloudstack/blob/stable-website/website/docs/index.html.markdown\u003c/a\u003e\u003c/p\u003e\n\u003col start=\"2\"\u003e\n\u003cli\u003eDownload the terrform provider for cloudstack based on the os you are running\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003ca href=\"https://releases.hashicorp.com/terraform-provider-cloudstack/0.3.0/\"\u003ehttps://releases.hashicorp.com/terraform-provider-cloudstack/0.3.0/\u003c/a\u003e\u003c/p\u003e\n\u003col start=\"3\"\u003e\n\u003cli\u003eOn linux and mac\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eMove it\u003c/p\u003e","title":"Terraformcloudstack"},{"content":"After hearing frequent mentions of Raspberry pi use cases, I had decided to buy Raspberry pi 4 model.\nThe site https://www.thingbits.in was giving best discounts on pi and it\u0026rsquo;s accessories.\nThe best use case of pi was the implementation of PI-HOLE which blocks all the ads on websites.\nHere are links i used for the complete installation of pi and implementation of PI-HOLE\nhttps://docs.pi-hole.net/\nhttps://medium.com/swlh/how-to-set-up-pi-hole-2293246dc8ed\nhttps://filterlists.com/lists/pl-host-file\n","permalink":"https://kiranchavala.github.io/blog/raspberrypi/","summary":"\u003cp\u003eAfter hearing frequent mentions of Raspberry pi use cases, I had decided to buy Raspberry pi 4 model.\u003c/p\u003e\n\u003cp\u003eThe site \u003ca href=\"https://www.thingbits.in\"\u003ehttps://www.thingbits.in\u003c/a\u003e  was giving best discounts on pi and it\u0026rsquo;s accessories.\u003c/p\u003e\n\u003cfigure\u003e\n    \u003cimg loading=\"lazy\" src=\"/img/pi.png\"/\u003e \n\u003c/figure\u003e\n\n\u003cp\u003eThe best use case of pi was the implementation of PI-HOLE which blocks all the ads on websites.\u003c/p\u003e\n\u003cp\u003eHere are links i used for the complete installation of pi and implementation of PI-HOLE\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://docs.pi-hole.net/\"\u003ehttps://docs.pi-hole.net/\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://medium.com/swlh/how-to-set-up-pi-hole-2293246dc8ed\"\u003ehttps://medium.com/swlh/how-to-set-up-pi-hole-2293246dc8ed\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://filterlists.com/lists/pl-host-file\"\u003ehttps://filterlists.com/lists/pl-host-file\u003c/a\u003e\u003c/p\u003e","title":"Raspberry pi"},{"content":"To download the songs from spotify\nhttps://gist.github.com/kiranchavala/36afff2694c620421e26dd8c85cd74a4\nReferences\nhttps://github.com/SathyaBhat/spotify-dl\nhttps://sathyasays.com/2015/12/29/spotify-dl-download-your-spotify-my-music-songs-as-mp3/\nhttps://medium.com/@sachithmuhandiram/youtube-dl-cheatsheet-bcc0782e7124\n","permalink":"https://kiranchavala.github.io/blog/downloading-songs-from-spotify/","summary":"\u003cp\u003eTo download the songs from spotify\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/kiranchavala/36afff2694c620421e26dd8c85cd74a4\"\u003ehttps://gist.github.com/kiranchavala/36afff2694c620421e26dd8c85cd74a4\u003c/a\u003e\u003c/p\u003e\n\u003cscript src=\"https://gist.github.com/kiranchavala/36afff2694c620421e26dd8c85cd74a4.js\"\u003e\u003c/script\u003e\n\n\u003cp\u003eReferences\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/SathyaBhat/spotify-dl\"\u003ehttps://github.com/SathyaBhat/spotify-dl\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://sathyasays.com/2015/12/29/spotify-dl-download-your-spotify-my-music-songs-as-mp3/\"\u003ehttps://sathyasays.com/2015/12/29/spotify-dl-download-your-spotify-my-music-songs-as-mp3/\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://medium.com/@sachithmuhandiram/youtube-dl-cheatsheet-bcc0782e7124\"\u003ehttps://medium.com/@sachithmuhandiram/youtube-dl-cheatsheet-bcc0782e7124\u003c/a\u003e\u003c/p\u003e","title":"Downloading songs from Spotify"},{"content":"k9s is an excellent cli tool to interact with the kubernetes clusters\nbrew install derailed/k9s/k9s\nRef: https://k9scli.io/topics/install/ https://k9scli.io/\n","permalink":"https://kiranchavala.github.io/blog/k9scli/","summary":"\u003cp\u003ek9s is an excellent cli tool to interact with the kubernetes clusters\u003c/p\u003e\n\u003cp\u003ebrew install derailed/k9s/k9s\u003c/p\u003e\n\u003cp\u003eRef:\n\u003ca href=\"https://k9scli.io/topics/install/\"\u003ehttps://k9scli.io/topics/install/\u003c/a\u003e\n\u003ca href=\"https://k9scli.io/\"\u003ehttps://k9scli.io/\u003c/a\u003e\u003c/p\u003e","title":"K9scli"},{"content":"K3s is light weight kubernetes distribution from Rancher\nhttps://gist.github.com/kiranchavala/71835ec52a2c5020a5e439345b57d744\nRef: https://k3s.io/ https://github.com/alexellis/k3sup\n","permalink":"https://kiranchavala.github.io/blog/installing-k3s/","summary":"\u003cp\u003eK3s is light weight kubernetes distribution  from Rancher\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/kiranchavala/71835ec52a2c5020a5e439345b57d744\"\u003ehttps://gist.github.com/kiranchavala/71835ec52a2c5020a5e439345b57d744\u003c/a\u003e\u003c/p\u003e\n\u003cscript src=\"https://gist.github.com/kiranchavala/71835ec52a2c5020a5e439345b57d744.js\"\u003e\u003c/script\u003e\n\n\u003cp\u003eRef: \u003ca href=\"https://k3s.io/\"\u003ehttps://k3s.io/\u003c/a\u003e\n\u003ca href=\"https://github.com/alexellis/k3sup\"\u003ehttps://github.com/alexellis/k3sup\u003c/a\u003e\u003c/p\u003e","title":"Installing k3s"},{"content":"Merging kubeconfig files\nWhen you have multiple kubernetes clusters, manually entering to the kubectl config is time consuming and error prone\nAdd the two config files to the env var export KUBECONFIG=/.kube/config:/Desktop/configFile2.yaml\nReview that you have two configurations in one view\nkubectl config view\nView the raw config and output to a new file\nkubectl config view \u0026ndash;raw \u0026gt; test.yaml\ncp test.yaml .kube/config\nenv\nyou can unset the KUBECONFIG later on\nunset KUBECONFIG\n","permalink":"https://kiranchavala.github.io/blog/merging-kube-config-files/","summary":"\u003cp\u003eMerging kubeconfig files\u003c/p\u003e\n\u003cp\u003eWhen you have multiple kubernetes clusters, manually entering to the kubectl config is time consuming and error prone\u003c/p\u003e\n\u003cp\u003eAdd the two config files to the env var\nexport KUBECONFIG=\u003cdel\u003e/.kube/config:\u003c/del\u003e/Desktop/configFile2.yaml\u003c/p\u003e\n\u003cp\u003eReview that you have two configurations in one view\u003c/p\u003e\n\u003cp\u003ekubectl config view\u003c/p\u003e\n\u003cp\u003eView the raw config and output to a new file\u003c/p\u003e\n\u003cp\u003ekubectl config view \u0026ndash;raw \u0026gt; test.yaml\u003c/p\u003e\n\u003cp\u003ecp test.yaml .kube/config\u003c/p\u003e\n\u003cp\u003eenv\u003c/p\u003e\n\u003cp\u003eyou can unset the KUBECONFIG later on\u003c/p\u003e","title":"Mergingkubeconfig"},{"content":"Add alias in your .zshrc file\nalias history=\u0026ldquo;history 0\u0026rdquo;\nsource ~/.zshrc\n","permalink":"https://kiranchavala.github.io/blog/enabling-zsh-history/","summary":"\u003cp\u003eAdd  alias in your .zshrc file\u003c/p\u003e\n\u003cp\u003ealias history=\u0026ldquo;history 0\u0026rdquo;\u003c/p\u003e\n\u003cp\u003esource ~/.zshrc\u003c/p\u003e","title":"Enabling zsh history"},{"content":"Hugo Requires Go\nbrew install hugo\ncreate a folder for your website files\nhugo server up #It will generate a site locally on port 1313\nInstall a theme and copy exampleSite/config.toml to the root folder\nmkdir themes // Creates a \u0026ldquo;themes\u0026rdquo; Folder cd themes // Points to the \u0026ldquo;themes\u0026rdquo; Folder git submodule add https://github.com/pacollins/hugo-future-imperfect-slim.git\nYoutube references\nMike Dane\u0026rsquo;s Playlist\nRef\nInstallation\nhttps://gohugo.io/getting-started/installing/\nTheme https://github.com/pacollins/hugo-future-imperfect-slim#examplesite\n","permalink":"https://kiranchavala.github.io/blog/using-hugo/","summary":"\u003cp\u003eHugo Requires Go\u003c/p\u003e\n\u003cp\u003ebrew install hugo\u003c/p\u003e\n\u003cp\u003ecreate a folder for your website files\u003c/p\u003e\n\u003cp\u003ehugo server up  #It will generate a site locally on port 1313\u003c/p\u003e\n\u003cp\u003eInstall a theme and copy exampleSite/config.toml to the root folder\u003c/p\u003e\n\u003cp\u003emkdir themes     // Creates a \u0026ldquo;themes\u0026rdquo; Folder\ncd themes        // Points to the \u0026ldquo;themes\u0026rdquo; Folder\ngit submodule add \u003ca href=\"https://github.com/pacollins/hugo-future-imperfect-slim.git\"\u003ehttps://github.com/pacollins/hugo-future-imperfect-slim.git\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eYoutube references\u003c/p\u003e\n\u003cp\u003eMike Dane\u0026rsquo;s Playlist\u003c/p\u003e\n\u003cdiv style=\"position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;\"\u003e\n      \u003ciframe allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen\" loading=\"eager\" referrerpolicy=\"strict-origin-when-cross-origin\" src=\"https://www.youtube.com/embed/qtIqKaDlqXo?autoplay=0\u0026amp;controls=1\u0026amp;end=0\u0026amp;loop=0\u0026amp;mute=0\u0026amp;start=0\" style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;\" title=\"YouTube video\"\u003e\u003c/iframe\u003e\n    \u003c/div\u003e\n\n\u003cp\u003eRef\u003c/p\u003e","title":"Using Hugo"},{"content":"Rancher is a tool to manage your kubernetes cluster\nThe installation steps are here\nhttps://gist.github.com/kiranchavala/893ec350dd55f9fb4747b602208bb4fc\n","permalink":"https://kiranchavala.github.io/blog/installing-rancher/","summary":"\u003cp\u003eRancher is a tool to manage your kubernetes cluster\u003c/p\u003e\n\u003cp\u003eThe installation steps are here\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/kiranchavala/893ec350dd55f9fb4747b602208bb4fc\"\u003ehttps://gist.github.com/kiranchavala/893ec350dd55f9fb4747b602208bb4fc\u003c/a\u003e\u003c/p\u003e\n\u003cscript src=\"https://gist.github.com/kiranchavala/893ec350dd55f9fb4747b602208bb4fc.js\"\u003e\u003c/script\u003e","title":"Installing Rancher"},{"content":"The steps are here\nhttps://gist.github.com/kiranchavala/7e4cda9bff5e141bd7601c870191e051\n","permalink":"https://kiranchavala.github.io/blog/installing-kubernetes-via-kubeadm/","summary":"\u003cp\u003eThe steps are here\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/kiranchavala/7e4cda9bff5e141bd7601c870191e051\"\u003ehttps://gist.github.com/kiranchavala/7e4cda9bff5e141bd7601c870191e051\u003c/a\u003e\u003c/p\u003e\n\u003cscript src=\"https://gist.github.com/kiranchavala/7e4cda9bff5e141bd7601c870191e051.js\"\u003e\u003c/script\u003e","title":"Installing kubernetes via kubeadm"},{"content":"Jekyll is popular static site generator\nThe steps are here\nhttps://gist.github.com/kiranchavala/152291d148c3694b37d691ca1df1fe8d\nYoutube references\nMike Dane\u0026rsquo;s Playlist\nBill Raymond\n","permalink":"https://kiranchavala.github.io/blog/using-jekyll/","summary":"\u003cp\u003eJekyll is popular static site generator\u003c/p\u003e\n\u003cp\u003eThe steps are here\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://gist.github.com/kiranchavala/152291d148c3694b37d691ca1df1fe8d\"\u003ehttps://gist.github.com/kiranchavala/152291d148c3694b37d691ca1df1fe8d\u003c/a\u003e\u003c/p\u003e\n\u003cscript src=\"https://gist.github.com/kiranchavala/152291d148c3694b37d691ca1df1fe8d.js\"\u003e\u003c/script\u003e\n\n\u003cp\u003eYoutube references\u003c/p\u003e\n\u003cp\u003eMike Dane\u0026rsquo;s Playlist\u003c/p\u003e\n\u003cdiv style=\"position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;\"\u003e\n      \u003ciframe allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen\" loading=\"eager\" referrerpolicy=\"strict-origin-when-cross-origin\" src=\"https://www.youtube.com/embed/T1itpPvFWHI?autoplay=0\u0026amp;controls=1\u0026amp;end=0\u0026amp;loop=0\u0026amp;mute=0\u0026amp;start=0\" style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;\" title=\"YouTube video\"\u003e\u003c/iframe\u003e\n    \u003c/div\u003e\n\n\u003cp\u003eBill Raymond\u003c/p\u003e\n\u003cdiv style=\"position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;\"\u003e\n      \u003ciframe allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen\" loading=\"eager\" referrerpolicy=\"strict-origin-when-cross-origin\" src=\"https://www.youtube.com/embed/EvYs1idcGnM?autoplay=0\u0026amp;controls=1\u0026amp;end=0\u0026amp;loop=0\u0026amp;mute=0\u0026amp;start=0\" style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;\" title=\"YouTube video\"\u003e\u003c/iframe\u003e\n    \u003c/div\u003e","title":"Using Jekyll"},{"content":"If you want to execute the same command across different server\nhttps://github.com/tmux/tmux/wiki\n","permalink":"https://kiranchavala.github.io/blog/using-tmux/","summary":"\u003cp\u003eIf you want to execute the same command across different server\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/tmux/tmux/wiki\"\u003ehttps://github.com/tmux/tmux/wiki\u003c/a\u003e\u003c/p\u003e\n\u003cfigure\u003e\n    \u003cimg loading=\"lazy\" src=\"/img/tmux.png\"/\u003e \n\u003c/figure\u003e","title":"Using tmux"},{"content":" To verify if IPv6 is enabled or not, execute\nifconfig -a | grep inet6\ninet6 fe80::211:aff:fe6a:9de4 prefixlen 64 scopeid 0x20\ninet6 ::1 prefixlen 128 scopeid 0x10[host]\nDisable Ipv6 in kernel module (requires reboot)\nEdit /etc/default/grub\nadd ipv6.disable=1 in line GRUB_CMDLINE_LINUX, e.g\ncat /etc/default/grub GRUB_TIMEOUT=5 GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT=\u0026quot;console\u0026quot; GRUB_CMDLINE_LINUX=\u0026quot;ipv6.disable=1 crashkernel=auto rhgb quiet\u0026quot; GRUB_DISABLE_RECOVERY=\u0026quot;true\u0026quot; Regenerate a GRUB configuration file and overwrite existing one\ngrub2-mkconfig -o /boot/grub2/grub.cfg\nRestart system and verify no line “inet6” in “ip addr show” command output\nshutdown -r now\n","permalink":"https://kiranchavala.github.io/blog/disable-ipv6-in-centos-7/","summary":"\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eTo verify if IPv6 is enabled or not, execute\u003c/p\u003e\n\u003cp\u003eifconfig -a | grep inet6\u003c/p\u003e\n\u003cp\u003einet6 fe80::211:aff:fe6a:9de4  prefixlen 64  scopeid 0x20\u003c/p\u003e\n\u003cp\u003einet6 ::1  prefixlen 128  scopeid 0x10[host]\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eDisable Ipv6 in kernel module (requires reboot)\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eEdit /etc/default/grub\u003c/p\u003e\n\u003cp\u003eadd ipv6.disable=1 in line GRUB_CMDLINE_LINUX, e.g\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ecat /etc/default/grub\nGRUB_TIMEOUT=5\nGRUB_DEFAULT=saved\nGRUB_DISABLE_SUBMENU=true\nGRUB_TERMINAL_OUTPUT=\u0026quot;console\u0026quot;\nGRUB_CMDLINE_LINUX=\u0026quot;ipv6.disable=1 crashkernel=auto rhgb quiet\u0026quot;\nGRUB_DISABLE_RECOVERY=\u0026quot;true\u0026quot;\n\u003c/code\u003e\u003c/pre\u003e\n\u003col start=\"3\"\u003e\n\u003cli\u003e\n\u003cp\u003eRegenerate a GRUB configuration file and overwrite existing one\u003c/p\u003e\n\u003cp\u003egrub2-mkconfig -o /boot/grub2/grub.cfg\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eRestart system and verify no line “inet6” in “ip addr show” command output\u003c/p\u003e","title":"Disable ipv6 in centos 7"},{"content":"I am a Software Engineer at Shapeblue, working on Cloud Stack Orchestration and various tech related to Cloud Infra, container technology like Docker, Kubernetes\n","permalink":"https://kiranchavala.github.io/about/","summary":"\u003cp\u003eI am a Software Engineer at Shapeblue, working on Cloud Stack Orchestration and various tech related to Cloud Infra, container technology like Docker, Kubernetes\u003c/p\u003e","title":""},{"content":"You can reach me\nEmail kiranchavala@gmail.com\nTwitter @kiranchavala\n","permalink":"https://kiranchavala.github.io/contact/","summary":"\u003cp\u003eYou can reach me\u003c/p\u003e\n\u003cp\u003eEmail\n\u003ca href=\"mailto:kiranchavala@gmail.com\"\u003ekiranchavala@gmail.com\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eTwitter\n@kiranchavala\u003c/p\u003e","title":""}]