{"id":16179303,"url":"https://github.com/jonashackt/devops-lectures","last_synced_at":"2026-02-10T05:34:45.316Z","repository":{"id":147269518,"uuid":"317273080","full_name":"jonashackt/devops-lectures","owner":"jonashackt","description":"Notes for my lecture about DevOps at Leipzig University (https://sws.informatik.uni-leipzig.de/team/)","archived":false,"fork":false,"pushed_at":"2020-11-30T19:46:13.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-18T19:36:29.418Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonashackt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-30T15:54:53.000Z","updated_at":"2020-11-30T19:46:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"719819f5-3634-4c15-b266-797cd3d5eed3","html_url":"https://github.com/jonashackt/devops-lectures","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonashackt/devops-lectures","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fdevops-lectures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fdevops-lectures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fdevops-lectures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fdevops-lectures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonashackt","download_url":"https://codeload.github.com/jonashackt/devops-lectures/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fdevops-lectures/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29291174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T03:42:42.660Z","status":"ssl_error","status_checked_at":"2026-02-10T03:42:41.897Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-10T05:26:42.826Z","updated_at":"2026-02-10T05:34:45.297Z","avatar_url":"https://github.com/jonashackt.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# devops-lectures\nNotes for my lecture about DevOps at Leipzig University (https://sws.informatik.uni-leipzig.de/team/)\n\n### Development Process\n\n* Create a new repository „devopsdemo“ \u0026 clone it locally \n* Create Issue in Repo: \"New Webapplication should react with \"Hello World\" to a GET request.“\n* Create Spring skeleton with Reactive Web\n* Extract and copy to cloned location\n* Import into Intellij\n* Switch branch to new „new-webapplication“\n\n\n__HelloRouterTest.java__ \n```java\nimport org.junit.jupiter.api.Test;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.http.MediaType;\nimport org.springframework.test.web.reactive.server.WebTestClient;\n\n@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)\nclass HelloRouterTest {\n\n\t@Test void\n\tshould_call_reactive_rest_resource(@Autowired WebTestClient webTestClient) {\n\t\twebTestClient.get().uri(\"/hello\")\n\t\t\t\t.accept(MediaType.TEXT_PLAIN)\n\t\t\t\t.exchange()\n\t\t\t\t.expectBody(String.class).isEqualTo(\"Hello World\");\n\t}\n}\n```\n\n__HelloRouter.java__ \n```java\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.http.MediaType;\nimport org.springframework.stereotype.Component;\nimport org.springframework.web.reactive.function.BodyInserters;\nimport org.springframework.web.reactive.function.server.*;\nimport reactor.core.publisher.Mono;\n\n@Component\npublic class HelloRouter {\n\n    public Mono\u003cServerResponse\u003e hello(ServerRequest serverRequest) {\n        return ServerResponse\n                .ok()\n                .contentType(MediaType.TEXT_PLAIN)\n                .body(BodyInserters.fromValue(\"Hello World\"));\n    }\n\n    @Bean\n    public RouterFunction\u003cServerResponse\u003e route() {\n        return RouterFunctions.route(\n                RequestPredicates.GET(\"/hello\").and(RequestPredicates.accept(MediaType.TEXT_PLAIN)),\n                serverRequest -\u003e hello(serverRequest)\n        );\n    }\n}\n```\n\n* Insert Implementation code\n* Run test again – should be green now\n* Now commit code (use Issue id!) und push\n\n\n### Continuous Integration  \n\n* Create new .github/workflows directory \u0026 maven.yml inside\n\n__github-actions-maven.yml__ \n```yaml\nname: devopsdemo\n\non: [push]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v2\n    - name: Set up JDK 12\n      uses: actions/setup-java@v1\n      with:\n        java-version: 12\n    - name: Test with Maven\n      run: mvn -B test --no-transfer-progress\n```\n\n* Add badge to README.md\n\n```markdown\n[![Build Status](https://github.com/jonashackt/devopsdemo/workflows/devopsdemo/badge.svg)](https://github.com/jonashackt/devopsdemo/actions)\n```\n\n* Commit \u0026 push\n\n\n### Continuous Deployment\n\nWe need JDK 11, so let's configure it (or we'll end up with `Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project devopsdemo: Fatal error compiling: invalid target release: 11 ` errors):\n\n__system.properties__\n\n```properties\njava.runtime.version=11\n```\n\nNow create the app at the console\n\n```\nheroku apps:create devopsdemo-deployment-staging\n```\n\n* Heroku app \u003e Deploy \u003e GitHub: Connect to GitHub \u003e search repo\n* Enable automatic deploys + wait for CI to pass before deploy\n* Add Heroku badge\n\n```markdown\n[![Deployed on Heroku](https://img.shields.io/badge/heroku-deployed-blueviolet.svg?logo=heroku\u0026)](https://devopsdemo-deployment-staging.herokuapp.com/hello)\n```\n\n* Change some code \u0026 push\n* Why didn't the automatic deploy work?\n* Pull Request!\n* Watch the Heroku Apps' Activity -\u003e Deployment\n\nAccess the App:\n\nhttps://devopsdemo-deployment-staging.herokuapp.com/hello\n\n### Stages\n\n* Add a new Pipeline to the App (at Deploy)\n* Connect Pipeline to GitHub repository \u0026 enable Review Apps\n* Create new Issue „cool new feature“\n* Change some code, create new branch, push with #2\n\n* PullRequest for the new feature\n* Create new Review app in Heroku\n* Access App in Browser\n* Merge PullRequest\n\n* Watch staging environment get updated\n\n__How do we deploy to production?__\n\n* Create production environment\n\n```\nheroku apps:create devopsdemo-deployment\n```\n\n* Click on \"Deploy a branch...\" to __manually__ issue a production release\n\n\n### Docker\n\nInstall Docker (Mac: `brew cask install docker`)\n\nCreate __Dockerfile__\n\n```dockerfile\nFROM adoptopenjdk:11-jre-hotspot\n\nVOLUME /tmp\n\n# Add Spring Boot app.jar to Container\nCOPY target/*.jar app.jar\n\nENV JAVA_OPTS=\"\"\n\n# Fire up our Spring Boot app by default\nENTRYPOINT [ \"sh\", \"-c\", \"java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar\" ]\n```\n\nBuild the app with Maven\n\n```shell script\nmvn clean package\n```\n\nBuild Docker image with:\n\n```shell script\ndocker build . --tag devopsdemo:latest\n```\n\nNow run our Docker container (with port binding):\n\n```shell script\ndocker run -p 8080:8080 devopsdemo:latest\n```\n\nAccess our App at\n\nhttp://localhost:8080/hello","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonashackt%2Fdevops-lectures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonashackt%2Fdevops-lectures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonashackt%2Fdevops-lectures/lists"}