{"id":1143,"date":"2022-01-02T11:35:19","date_gmt":"2022-01-02T18:35:19","guid":{"rendered":"https:\/\/bullyrooks.com\/?p=1143"},"modified":"2022-01-05T16:33:27","modified_gmt":"2022-01-05T23:33:27","slug":"cloud-kube-create-github-repo","status":"publish","type":"post","link":"https:\/\/bullyrooks.com\/index.php\/2022\/01\/02\/cloud-kube-create-github-repo\/","title":{"rendered":"Cloud Kube | Create Github Repo"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Create a GitHub Repository<\/h2>\n\n\n\n<p>Log into your github account and create a new github repository.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"298\" height=\"99\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image.png?resize=298%2C99&#038;ssl=1\" alt=\"\" class=\"wp-image-1144\" data-recalc-dims=\"1\"\/><\/figure>\n\n\n\n<p>Name the repo (I&#8217;m using <code>cloud_application<\/code>), add a <code>README <\/code>and a <code>.gitignore<\/code> with the <code>java<\/code> template.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"728\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-1.png?resize=665%2C728&#038;ssl=1\" alt=\"\" class=\"wp-image-1145\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-1.png?w=665&amp;ssl=1 665w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-1.png?resize=274%2C300&amp;ssl=1 274w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Create an Intellij Project<\/h2>\n\n\n\n<p>From the intellij welcome screen, pick new project<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"589\" height=\"107\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-4.png?resize=589%2C107&#038;ssl=1\" alt=\"\" class=\"wp-image-1148\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-4.png?w=589&amp;ssl=1 589w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-4.png?resize=300%2C54&amp;ssl=1 300w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Name the project <code>cloud_application<\/code>.  Use your domain as the group.  Hit Next.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"803\" height=\"520\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-5.png?resize=803%2C520&#038;ssl=1\" alt=\"\" class=\"wp-image-1149\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-5.png?w=803&amp;ssl=1 803w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-5.png?resize=300%2C194&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-5.png?resize=768%2C497&amp;ssl=1 768w\" sizes=\"auto, (max-width: 803px) 100vw, 803px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>We only need the basic packages for now, so choose: DevTools, Lombok and Spring Web.  Hit Finish.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"621\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-6.png?resize=802%2C621&#038;ssl=1\" alt=\"\" class=\"wp-image-1150\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-6.png?w=802&amp;ssl=1 802w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-6.png?resize=300%2C232&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-6.png?resize=768%2C595&amp;ssl=1 768w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>We should now have a populated spring boot application<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"393\" height=\"204\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-7.png?resize=393%2C204&#038;ssl=1\" alt=\"\" class=\"wp-image-1151\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-7.png?w=393&amp;ssl=1 393w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-7.png?resize=300%2C156&amp;ssl=1 300w\" sizes=\"auto, (max-width: 393px) 100vw, 393px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Link to the Github Repo<\/h2>\n\n\n\n<p>Now we need to associate our project to our github repo.  We can do that with these commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ git init\nInitialized empty Git repository in C:\/workspace\/github\/cloud_application\/.git\/\n\n$ git remote add origin git@github.com:bullyrooks\/cloud_application.git\n\n$ git fetch\nEnter passphrase for key '***': \nremote: Enumerating objects: 4, done.\nremote: Counting objects: 100% (4\/4), done.\nremote: Compressing objects: 100% (3\/3), done.\nUnpacking objects: 100% (4\/4), 847 bytes | 70.00 KiB\/s, done.\nremote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0\nFrom github.com:bullyrooks\/cloud_application\n * &#91;new branch]      main       -&gt; origin\/main\n\n$ git checkout origin\/main -ft\nSwitched to a new branch 'main'\nBranch 'main' set up to track remote branch 'main' from 'origin'.\n<\/code><\/pre>\n\n\n\n<p>You should now see a <code>.gitignore<\/code> and a <code>README.md<\/code> in your project<\/p>\n\n\n\n<p>Now we&#8217;re going to push our initial project structure back up, but we&#8217;ll need to add files to <code>.gitignore<\/code> first.  Add these entries to <code>.gitignore<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.idea\n*.iml\ntarget<\/code><\/pre>\n\n\n\n<p>Additionally, since I&#8217;m working on windows I needed to update the permissions for the .mvnw file so that github actions can execute it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ git update-index --chmod=+x .\/mvnw<\/code><\/pre>\n\n\n\n<p>now push up your changes<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ git add .\nwarning: LF will be replaced by CRLF in HELP.md.\n...\n\n$ git commit -m \"project init\"\n&#91;main 1a73461] project init\n 8 files changed, 603 insertions(+)\n create mode 100644 HELP.md\n create mode 100644 mvnw\n\n$ git push\nEnumerating objects: 24, done.\nCounting objects: 100% (24\/24), done.\nDelta compression using up to 4 threads\nCompressing objects: 100% (13\/13), done.\nWriting objects: 100% (22\/22), 8.08 KiB | 459.00 KiB\/s, done.\nTotal 22 (delta 1), reused 0 (delta 0), pack-reused 0\nremote: Resolving deltas: 100% (1\/1), completed with 1 local object.\n<\/code><\/pre>\n\n\n\n<p>And that&#8217;s it for now.  <\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"entry-summary\">\nCreate a GitHub Repository Log into your github account and create a&hellip;\n<\/div>\n<div class=\"link-more\"><a href=\"https:\/\/bullyrooks.com\/index.php\/2022\/01\/02\/cloud-kube-create-github-repo\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;Cloud Kube | Create Github Repo&rdquo;<\/span>&hellip;<\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[44],"course":[149],"class_list":["post-1143","post","type-post","status-publish","format-standard","hentry","category-software-development","tag-github","course-kubernetes-application-hosted-in-the-cloud","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":827,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-1-d67f80487848\/","url_meta":{"origin":1143,"position":0},"title":"Setup: IDE and New Project","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"\u00a0Its very easy to get a spring boot microservice up and running. You can read any variety of articles on medium (or other service) on how to do that. However, there\u2019s little about how to do some of the more complicated things that you need in order to support a\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1065,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/07\/23\/spring-boot-lambda-prerequisites\/","url_meta":{"origin":1143,"position":1},"title":"Spring Boot Lambda Prerequisites","author":"Bullyrook","date":"July 23, 2021","format":false,"excerpt":"In this course we're going to build a very simple spring boot lambda, deploy it manually to AWS to make sure that it works and then automate the deployment using Terraform and github actions. This will allow us to automatically build and deploy changes from a commit to the main\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2021\/07\/image.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":824,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-10-e1a3a8e865bb\/","url_meta":{"origin":1143,"position":2},"title":"Automated Build Pipeline","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"Lets set up automated build so that we can generate a docker image when a change hits master. Build the\u00a0Pipeline Go in to codefresh and choose Projects. Create a new project in the top right. Call it medium. Click on create pipeline. Call the pipeline medium-customer and choose our git\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1176,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/01\/04\/cloud-kube-helm-initialization-and-chart-publishing\/","url_meta":{"origin":1143,"position":3},"title":"Cloud Kube | Helm Initialization and Chart Publishing","author":"Bullyrook","date":"January 4, 2022","format":false,"excerpt":"Now that we're producing versioned docker images into our registry lets get helm setup and publish versioned charts. This will allow us to deploy fully configured services into kubernetes. Helm Init I'm assuming that helm is already installed in your development environment, so I'm not going to cover installing it.\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-25.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-25.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-25.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1205,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/01\/04\/kube-cloud-automate-kube-deploy\/","url_meta":{"origin":1143,"position":4},"title":"Kube Cloud | Automate Kube Deploy","author":"Bullyrook","date":"January 4, 2022","format":false,"excerpt":"Lets improve our CD pipeline by automating deployment. Update Build Pipeline I only want main to deploy on successful build. So add these lines to the end of the main.yaml github action workflow - name: Deploy uses: WyriHaximus\/github-action-helm3@v2 with: exec: | helm repo add bullyrooks https:\/\/bullyrooks.github.io\/helm-charts\/ helm repo update helm\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-36.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-36.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-36.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1161,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/01\/02\/cloud-kube-build-pipeline-initialization\/","url_meta":{"origin":1143,"position":5},"title":"Cloud Kube | Build Pipeline Initialization","author":"Bullyrook","date":"January 2, 2022","format":false,"excerpt":"Now that we have a service we're going to start building our pipeline so that as we add functionality to the application we can incorporate any build needs into the pipeline. Initialize Github Actions Create a new directory from the root of the project called .github\/workflows\/ create a file called\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-16.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-16.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-16.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-16.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-16.png?resize=1400%2C800&ssl=1 4x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/comments?post=1143"}],"version-history":[{"count":5,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1143\/revisions"}],"predecessor-version":[{"id":1213,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1143\/revisions\/1213"}],"wp:attachment":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/media?parent=1143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/categories?post=1143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/tags?post=1143"},{"taxonomy":"course","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/course?post=1143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}