{"id":16928137,"url":"https://github.com/dirien/octopus-deploy-hackathon","last_synced_at":"2026-04-19T10:35:04.858Z","repository":{"id":45483186,"uuid":"437266220","full_name":"dirien/octopus-deploy-hackathon","owner":"dirien","description":"Hackathon Repository for Octopus Deploy","archived":false,"fork":false,"pushed_at":"2021-12-11T22:13:03.000Z","size":7902,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T19:55:48.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dirien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-11T11:43:16.000Z","updated_at":"2022-04-26T04:51:57.000Z","dependencies_parsed_at":"2022-07-16T15:00:57.324Z","dependency_job_id":null,"html_url":"https://github.com/dirien/octopus-deploy-hackathon","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dirien/octopus-deploy-hackathon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Foctopus-deploy-hackathon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Foctopus-deploy-hackathon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Foctopus-deploy-hackathon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Foctopus-deploy-hackathon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirien","download_url":"https://codeload.github.com/dirien/octopus-deploy-hackathon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Foctopus-deploy-hackathon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32004041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-13T20:35:59.566Z","updated_at":"2026-04-19T10:35:04.831Z","avatar_url":"https://github.com/dirien.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My Octopus hackathon entry\n\n# Motivation\nSome background story, before we start to dig into the components of my Octopus hackathon entry:\n\nI saw this tweet from the great `Sarah Lean`\n\n%[https://twitter.com/TechieLass/status/1468868185738944515?s=20]\n\nAnd found following conditions, in the fine print:\n\n\u003e Octopus Deploy is part of this year’s Festive Tech Calendar, running a hackathon competition.\n\n\u003eThe aim of the hackathon is to deploy an Azure Web App using Octopus Deploy.\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639259966385/FBDkkvDAQ.png)\n\nThat sounds very interesting for me, It's really a long time, since I used the Azure App Service and on top I did absolutely nothing with Octopus Deploy. Ever!\n\nTime to start:\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639260160913/ltMmeHgGA.png)\n\n# The Web App\nSo let me see, what I should do for the web app! I quickly draw the idea, that I wanted to create a golang webservice, which just delivers a Lofi gif. Quick and cool!\n\n![lofi.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1639257073921/pFyEqPD_o.gif)\n\nIn particular this gif. I don't know, but I am really fascinated from the type of 8-bit pixel art.\n\nSo in the `https://github.com/dirien/octopus-deploy-hackathon/tree/main/app` folder, you will find the mini go app and the Dockerfile to build the container.\n\nBecause now comes one downside: App Service has first-class support for ASP.NET, ASP.NET Core, Java, Ruby, Node.js, PHP, or Python.  And no golang support! Now I remember, why I never worked further with Azure App Service, welp! But I can dockerize my app. And that's what I am going to do!\n\n# Infrastructure as Code\n\nTerraform is first class citizen in Octopus Deploy:\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639257571999/tQU-yj82bV.png)\n\nSo I am going to use Terraform this time, for all my deployments in Azure. Octopus Deploy offers many more dedicated, so called `steps` and the corresponding `step templates`. But since Jenkins, I don't feel it anymore to split my deployments into different providers (Plugins etc.). I want everything in one place.\n\nSo in the under `https://github.com/dirien/octopus-deploy-hackathon` will you find a very simple terraform deployment.\n\n### Terraform Cloud\nAs backend, I use `Terraform Cloud`. I really love it, that it takes care of my state file, and I don't need to look out for them.\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639257801345/KZ23oQieB.png)\n\nThere are much more stuff, Terraform Cloud offers. But I think this is material for another blog entry.\n\nThere are some variables I want to handle in `Octopus Deploy`. `Octopus Deploy` will replace variables in all *.tf, *.tfvars, *.tf.json and *.tfvars.json files using the #{Variable} substitution syntax. That's great!\n\nSo my main.tf looks like this:\n\n```hcl\nterraform {\n  required_providers {\n    azurerm = {\n      source  = \"hashicorp/azurerm\"\n      version = \"2.46.0\"\n    }\n  }\n  backend \"remote\" {\n    hostname     = \"app.terraform.io\"\n    organization = \"dirien\"\n    token        = \"#{TOKEN}\"\n    workspaces {\n      name = \"octopus-hackathon\"\n    }\n  }\n}\n\n\n\nprovider \"azurerm\" {\n  subscription_id = \"#{Azure.SubscriptionNumber}\"\n  client_id       = \"#{Azure.Client}\"\n  client_secret   = \"#{Azure.Password}\"\n  tenant_id       = \"#{Azure.TenantId}\"\n  features {}\n}\n```\nAs you see, the token for the TF Cloud and the credentials for the `service principal` of Azure are all variables, which gets substituted from `Octopus Deploy`.\n\nThe rest of the deployment, is really default.  Then only additional value, I hold in `Octopus Deploy` is the version of the app via ` linux_fx_version = \"DOCKER|dirien/lofi-go:#{APP_VERSION}\"` in the `azure.tf` file.\n\nBefore committing the code, I always run `tfsec`! Please do this too! I love how `tfsec` is giving me instant feedback about my terraform script.\n\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639260626642/8hqt9DX9Z.png)\n\nHere a little extract:\n```bash\n  Result 3\n\n  [azure-appservice-require-client-cert][LOW] Resource 'azurerm_app_service.octopus-deploy-as' has attribute client_cert_enabled that is false\n  /Users/dirien/Tools/repos/octopus-deploy-hackathon/azure.tf:60\n\n\n      57 |     dotnet_framework_version = \"v4.0\"\n      58 |     http2_enabled            = true\n      59 |   }\n      60 |   client_cert_enabled     = false    bool: false\n      61 |   logs {\n      62 |     detailed_error_messages_enabled = true\n      63 |     failed_request_tracing_enabled = true\n\n  Impact:     Mutual TLS is not being used\n  Resolution: Enable incoming certificates for clients\n\n  More Info:\n  - https://aquasecurity.github.io/tfsec/latest/checks/azure/appservice/require-client-cert \n  - https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/app_service#client_cert_enabled \n````\n# Octopus Deploy\n\nNow comes the last part, putting everything together in `Octopus Deploy`.\n\nYou can sign up for an [Octopus Cloud free trial](https://octopus.com/start/cloud) and can play easily for 30d around. That's very nice from the people of  `Octopus Deploy`.\n\nSo I created a Cloud Instance for me:\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639258581146/Zyzj_i-_I.png)\n\nAnd with the url `https://dirien.octopus.app` I can access my instance.\n\nI added under `Infrastructure -\u003e Accounts` my personal Azure subscription via a `service principal` and I am good to go, to create project.\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639258697223/Wpi6Nbxaf.png)\n\nUnder `Project`, I created my two `Octopus Deploy` projects\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639258820754/pSehvVmVV.png)\n\nOne is to create the infrastructure (including the app deployment) and the other one is to destroy the whole infrastructure. The rest, is all handled in my terraform via PR through a GitOps way of working. State changes, drifts etc. will be all handled by Terraform and Terraform Cloud.\n\nNot surprisingly, my process is straight forward und very simple. Terraform plan, ask for a manual improvement and then Terraform plan. That's it.\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639259098900/n6mQH8pJi.png)\n\nThe whole logging and auditing, is really nice done in `Octopus Deploy`. And I am sure, in a more real life scenario I got spend much more time to create an even more sophisticated deployment process. Really nice!\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639259141243/8IEQVU0b9.png)\n\n# Azure\n\nWhen everything went through you will see in the Azure portal your infrastructure:\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639259303191/i-mSx_lq3.png)\n\nSame goes for Terraform Cloud.\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639259345735/EFXLnBACY.png)\n\nAnd with `https://octopus-deploy-as.azurewebsites.net/` I can finally call my Web App.\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639259628364/WUJRYMRBSp.png)\n\n# That's it!\n\n![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639260454546/uPFsZJdaS.png)\n\n## Resources\n\n- https://octopus.com/blog/festive-tech-calendar-hackathon\n- https://docs.microsoft.com/en-us/azure/app-service/\n- https://www.terraform.io/cloud\n- https://octopus.com/start\n- https://github.com/aquasecurity/tfsec","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirien%2Foctopus-deploy-hackathon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirien%2Foctopus-deploy-hackathon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirien%2Foctopus-deploy-hackathon/lists"}