{"id":21598547,"url":"https://github.com/felipmiguel/springops","last_synced_at":"2026-05-21T04:02:09.690Z","repository":{"id":48373060,"uuid":"388851745","full_name":"felipmiguel/springops","owner":"felipmiguel","description":"GitOps tool for Azure Spring Cloud","archived":false,"fork":false,"pushed_at":"2021-08-06T15:07:32.000Z","size":131,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T17:46:02.669Z","etag":null,"topics":["azure-spring-cloud","gitops","spring-boot","spring-boot-cloud"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felipmiguel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-23T15:49:42.000Z","updated_at":"2023-04-25T06:47:34.000Z","dependencies_parsed_at":"2022-09-21T16:54:06.783Z","dependency_job_id":null,"html_url":"https://github.com/felipmiguel/springops","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipmiguel%2Fspringops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipmiguel%2Fspringops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipmiguel%2Fspringops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipmiguel%2Fspringops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipmiguel","download_url":"https://codeload.github.com/felipmiguel/springops/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244211132,"owners_count":20416585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-spring-cloud","gitops","spring-boot","spring-boot-cloud"],"created_at":"2024-11-24T18:12:32.426Z","updated_at":"2026-05-21T04:02:04.640Z","avatar_url":"https://github.com/felipmiguel.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpringOps\nGitOps Lab implementation for Azure Spring Cloud.\n\nThis solution consists of an agent that can be deployed as an application in an Azure Spring Cloud (ASC) service. The agent reads Application Deployment definitions from a given GIT repository and deploys to the ASC Service.\n\nThe agent retrieves changes from GIT periodically and applies the configuration to the ASC deployed applications.\nA sample Application Deployment definition:\n```yaml\nappName: \"springopsdemo\"\nversion: \"2.0\"\nartifactsSource: \"https://publicserver.org/releases/spring-cloud-microservice-0.0.1-SNAPSHOT.jar\"\nblueGreen: true\ninstanceCount: 2\nenvironmentVariables:\n  env1: \"envvalue1\"\ncpu: 1\nmemoryInGb: 1\njvmOptions: \"-Xms512m\"\nisPublic: true\nidentity: false\nruntime: \"Java_11\"\nhttpsOnly: false\nendToEndTls: true\npersistentDisk:\n  sizeInGb: 5\n  mountPath: \"/persistent\"\n```\nThe agent is able to perform a blue/green deployment. The behavior is:\n1. Create a Azure Spring Cloud application deployment\n2. Deploy the application in that deployment slot.\n3. Validate the deployment by making requests to application. Actually only the health endpoint (requires to configure actuator). Ideally a request to the an endpoint of the given application.\n4. If valid, set the deployment as active.\n5. Remove the other Azure Spring Cloud application deployments.\n\nFor this lab, the artifact should be accessible in a public location. Ideally it could be a private location such as a private Azure Storage Blob, GitHub releases, Azure DevOps published artifact.\n\nThe agent is compatible with Azure Spring Cloud configuration service and some parts of the application configuration can be dinamically modified without agent restarts.\n\nSample application.yaml configuration\n```yaml\nspring:\n    application:\n        name: \"spring-ops\"\n    cloud:\n        config:\n            auto-refresh: true\n            refresh-interval: 60\nspringops:\n    git:\n        uri: https://github.com/\u003cyour-account\u003e/\u003cyour-repo\u003e.git\n        user: \n        password:  \n        baseDirectory: /tmp/springops\n        frequency: \"* * * * *\" # Cron expression for git pulling frequency. This value is every minute\n```\n\n## How it works\nThe agent uses Azure Resource Management API to manage the applications. The agent should run with a managed identity and that identity should have permissions over the Azure Spring Cloud service instance.\n\nThere is job that checks the GIT repo for commits. If detects a new commit it enqueue a new deployment.\n\nThe deployment agent checks if the application exists. If it exists, retrieves the actual configuration and determines if it requires an update. It only applies the required changes.\nIt the application doesn't exist in Azure Spring Cloud it creates a new application and deploys it.\n\nThe job scheduling is implemented using [Jobrunr](https://www.jobrunr.io/).\n\n## Deployment\nBuild the JAR package and deploy as a regular Azure Spring Cloud application. \nThe following script assumes that you have an Azure subscription with an existing Azure Spring Cloud Service and az-cli installed locally.\n```bash\nRESOURCE_GROUP=\"\u003cyour resource group\u003e\"\nSPRING_CLOUD_SERVICE=\"\u003cyour azure spring cloud service\u003e\"\nSPRINGOPS_AGENT_NAME=\"springops-agent\"\nSPRINGOPS_AGENT_JAR=\"./springops-agent/target/springops-agent-1.0-SNAPSHOT.jar\"\n\naz configure --defaults \\\n    group=${RESOURCE_GROUP} \\\n    spring-cloud=${SPRING_CLOUD_SERVICE}\n\naz spring-cloud app create --name ${SPRINGOPS_AGENT_NAME} \\\n    --runtime-version Java_11 --assign-identity true\n\n# retrieve application managed identity\nAPP_IDENTITY=$(az spring-cloud app show --name ${SPRINGOPS_AGENT_NAME} \\\n    --query \"identity.principalId\" --output tsv)\n\n# retrieve Spring Cloud Service id\nASC_ID=$(az spring-cloud show -n ${SPRING_CLOUD_SERVICE} --query id --output tsv)\n\naz role assignment create --assignee ${APP_IDENTITY} --role \"Contributor\" --scope ${ASC_ID}\n\naz spring-cloud app deploy --name ${SPRINGOPS_AGENT_NAME} \\\n    --jar-path ${SPRINGOPS_AGENT_JAR} \\\n    --no-wait \n```\nIf the application fails at starting most probably the application is not yet configured. See sample application.yaml above. Azure Spring Cloud config server can be used for configuration. \n\nIf you don't have yet an Azure Spring Cloud service deployed you can use the script [deploy.sh](./deploy/deploy.sh). It uses terraform to deploy a new Azure Spring Cloud Service and the agent application.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipmiguel%2Fspringops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipmiguel%2Fspringops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipmiguel%2Fspringops/lists"}