From 2dc3491d8b9f12a04e28e0512e6258ffa71aca88 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 19:00:31 +0000 Subject: [PATCH] deploy: eafdab9669af3d8ea3368616e1502f71036305f1 --- 404.html | 4 ++-- assets/js/{675ef35d.7ca0d240.js => 675ef35d.44e25294.js} | 2 +- .../{runtime~main.328d7881.js => runtime~main.afe7ad37.js} | 2 +- blog/archive/index.html | 4 ++-- blog/index.html | 4 ++-- blog/tags/devops/index.html | 4 ++-- blog/tags/index.html | 4 ++-- blog/welcome/index.html | 4 ++-- docs/cloud/aws/index.html | 4 ++-- docs/cloud/azure/index.html | 4 ++-- docs/cloud/cloud-design-pattern/index.html | 4 ++-- docs/cloud/gcp/index.html | 4 ++-- docs/frameworks/angular/index.html | 4 ++-- docs/frameworks/dotnet/index.html | 4 ++-- docs/frameworks/nodejs/index.html | 4 ++-- docs/frameworks/react/index.html | 4 ++-- docs/frameworks/spring-boot/index.html | 4 ++-- docs/introduction/index.html | 4 ++-- docs/operating-system/alpine/index.html | 4 ++-- docs/operating-system/debian/index.html | 4 ++-- docs/operating-system/ubuntu/index.html | 4 ++-- docs/operating-system/windows/index.html | 4 ++-- docs/pipeline/bitbucket-pipeline/index.html | 4 ++-- docs/pipeline/github-actions/index.html | 4 ++-- docs/pipeline/gitlab/index.html | 4 ++-- docs/pipeline/jenkins/index.html | 4 ++-- docs/program-language/csharp/index.html | 4 ++-- docs/program-language/java/index.html | 4 ++-- docs/program-language/nodejs/index.html | 4 ++-- docs/program-language/python/index.html | 4 ++-- docs/program-language/rust/index.html | 4 ++-- docs/tags/alpine/index.html | 4 ++-- docs/tags/angular/index.html | 4 ++-- docs/tags/ansible/index.html | 4 ++-- docs/tags/aws/index.html | 4 ++-- docs/tags/azure/index.html | 4 ++-- docs/tags/bash/index.html | 4 ++-- docs/tags/bitbucket-pipeline/index.html | 4 ++-- docs/tags/bitbucket/index.html | 4 ++-- docs/tags/c/index.html | 4 ++-- docs/tags/cloud-design-pattern/index.html | 4 ++-- docs/tags/container/index.html | 4 ++-- docs/tags/csharp/index.html | 4 ++-- docs/tags/debian/index.html | 4 ++-- docs/tags/docker/index.html | 4 ++-- docs/tags/dotnet/index.html | 4 ++-- docs/tags/dotnetcore/index.html | 4 ++-- docs/tags/gcp/index.html | 4 ++-- docs/tags/git/index.html | 4 ++-- docs/tags/github-actions/index.html | 4 ++-- docs/tags/github/index.html | 4 ++-- docs/tags/gitlab/index.html | 4 ++-- docs/tags/husky/index.html | 4 ++-- docs/tags/index.html | 4 ++-- docs/tags/java/index.html | 4 ++-- docs/tags/javascript/index.html | 4 ++-- docs/tags/jenkins/index.html | 4 ++-- docs/tags/js/index.html | 4 ++-- docs/tags/kubernetes/index.html | 4 ++-- docs/tags/nginx/index.html | 4 ++-- docs/tags/node/index.html | 4 ++-- docs/tags/nodejs/index.html | 4 ++-- docs/tags/package-manager/index.html | 4 ++-- docs/tags/pipeline/index.html | 4 ++-- docs/tags/podman/index.html | 4 ++-- docs/tags/prometheus/index.html | 4 ++-- docs/tags/python/index.html | 4 ++-- docs/tags/react/index.html | 4 ++-- docs/tags/reactjs/index.html | 4 ++-- docs/tags/rust/index.html | 4 ++-- docs/tags/sonarqube/index.html | 4 ++-- docs/tags/spring-boot/index.html | 4 ++-- docs/tags/spring/index.html | 4 ++-- docs/tags/ssh/index.html | 4 ++-- docs/tags/terraform/index.html | 4 ++-- docs/tags/ubuntu/index.html | 4 ++-- docs/tags/windows/index.html | 4 ++-- docs/tools/ansible/index.html | 4 ++-- docs/tools/bash/index.html | 4 ++-- docs/tools/container/index.html | 4 ++-- docs/tools/git/index.html | 6 +++--- docs/tools/helm/index.html | 4 ++-- docs/tools/husky/index.html | 4 ++-- docs/tools/kubernetes/index.html | 4 ++-- docs/tools/nginx/index.html | 4 ++-- docs/tools/prometheus/index.html | 4 ++-- docs/tools/sonarqube/index.html | 4 ++-- docs/tools/ssh/index.html | 4 ++-- docs/tools/terraform/index.html | 4 ++-- index.html | 4 ++-- natarajan-ganapathi/index.html | 4 ++-- 91 files changed, 181 insertions(+), 181 deletions(-) rename assets/js/{675ef35d.7ca0d240.js => 675ef35d.44e25294.js} (95%) rename assets/js/{runtime~main.328d7881.js => runtime~main.afe7ad37.js} (99%) diff --git a/404.html b/404.html index 11e31cf3..47fcec49 100644 --- a/404.html +++ b/404.html @@ -6,13 +6,13 @@ Page Not Found | Cloud & DevOps - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/675ef35d.7ca0d240.js b/assets/js/675ef35d.44e25294.js similarity index 95% rename from assets/js/675ef35d.7ca0d240.js rename to assets/js/675ef35d.44e25294.js index d0f7512b..472ddbd1 100644 --- a/assets/js/675ef35d.7ca0d240.js +++ b/assets/js/675ef35d.44e25294.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfacebook=self.webpackChunkfacebook||[]).push([[3],{3905:function(e,t,r){r.d(t,{Zo:function(){return m},kt:function(){return g}});var o=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function a(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var c=o.createContext({}),s=function(e){var t=o.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},m=function(e){var t=s(e.components);return o.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},p=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,c=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),p=s(r),g=n,f=p["".concat(c,".").concat(g)]||p[g]||u[g]||i;return r?o.createElement(f,a(a({ref:t},m),{},{components:r})):o.createElement(f,a({ref:t},m))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,a=new Array(i);a[0]=p;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,a[1]=l;for(var s=2;s\n\n# Revert 1 commit from remote\ngit push --force origin HEAD~1:\n")),(0,i.kt)("p",null,"Set local repo user name and email"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},'git config user.name "Your Name Here"\ngit config user.email [email protected]\n')),(0,i.kt)("p",null,"For (global) default email (which is configured in your ~/.gitconfig):"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},'git config --global user.name "Your Name Here"\ngit config --global user.email [email protected]\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkfacebook=self.webpackChunkfacebook||[]).push([[3],{3905:function(e,t,r){r.d(t,{Zo:function(){return m},kt:function(){return g}});var o=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function a(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var c=o.createContext({}),s=function(e){var t=o.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},m=function(e){var t=s(e.components);return o.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},p=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,c=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),p=s(r),g=n,f=p["".concat(c,".").concat(g)]||p[g]||u[g]||i;return r?o.createElement(f,a(a({ref:t},m),{},{components:r})):o.createElement(f,a({ref:t},m))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,a=new Array(i);a[0]=p;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,a[1]=l;for(var s=2;s\n\n# Revert 1 commit from remote\ngit push --force origin HEAD~1:\n")),(0,i.kt)("p",null,"Set local repo user name and email"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},'git config user.name "Your Name Here"\ngit config user.email [email protected]\n')),(0,i.kt)("p",null,"For (global) default email (which is configured in your ~/.gitconfig):"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},'git config --global user.name "Your Name Here"\ngit config --global user.email [email protected]\n')),(0,i.kt)("p",null,"Ask password "),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"git config credential.helper store\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.328d7881.js b/assets/js/runtime~main.afe7ad37.js similarity index 99% rename from assets/js/runtime~main.328d7881.js rename to assets/js/runtime~main.afe7ad37.js index d03d560c..49342d7b 100644 --- a/assets/js/runtime~main.328d7881.js +++ b/assets/js/runtime~main.afe7ad37.js @@ -1 +1 @@ -!function(){"use strict";var e,c,f,a,b,d={},t={};function n(e){var c=t[e];if(void 0!==c)return c.exports;var f=t[e]={id:e,loaded:!1,exports:{}};return d[e].call(f.exports,f,f.exports,n),f.loaded=!0,f.exports}n.m=d,n.c=t,e=[],n.O=function(c,f,a,b){if(!f){var d=1/0;for(u=0;u=b)&&Object.keys(n.O).every((function(e){return n.O[e](f[r])}))?f.splice(r--,1):(t=!1,b0&&e[u-1][2]>b;u--)e[u]=e[u-1];e[u]=[f,a,b]},n.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(c,{a:c}),c},f=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},n.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var b=Object.create(null);n.r(b);var d={};c=c||[null,f({}),f([]),f(f)];for(var t=2&a&&e;"object"==typeof t&&!~c.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((function(c){d[c]=function(){return e[c]}}));return d.default=function(){return e},n.d(b,d),b},n.d=function(e,c){for(var f in c)n.o(c,f)&&!n.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:c[f]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(c,f){return n.f[f](e,c),c}),[]))},n.u=function(e){return"assets/js/"+({3:"675ef35d",53:"935f2afb",107:"1cb4cc54",241:"45df30ae",691:"9fcbb4d0",837:"48b25bf7",965:"5cc73787",988:"d41e4871",1170:"ad48a624",1183:"e26c4e66",1230:"4e42dfde",1436:"a7041dca",1442:"6584aacb",1478:"16343866",1605:"f4378185",1650:"471e6807",1740:"7e2792ca",1783:"abb1f4f7",1797:"c89b7122",1884:"2dbf55b1",1914:"d9f32620",2128:"0b5f7c33",2305:"a3117be4",2365:"b73d9758",2372:"a5ac18f0",2478:"cd9491a5",2535:"814f3328",2623:"7c778111",2786:"ff783d96",2882:"d03bdc50",3033:"713f5220",3085:"1f391b9e",3089:"a6aa9e1f",3387:"ea914be7",3568:"3c17bc19",3608:"9e4087bc",3751:"3720c009",3802:"9f343eac",3880:"6b1634f5",3925:"3fb8b2ea",3989:"e751dc84",3998:"f51ad1b9",4013:"01a85c17",4062:"f0d4968a",4121:"55960ee5",4134:"1947366a",4138:"d7ee6b6b",4174:"299c1e39",4195:"c4f5d8e4",4457:"0d43c417",4594:"6325aefb",4674:"d6ee146c",4751:"dbe88bca",5079:"52c07581",5363:"ff608c85",5540:"b141c4dc",5675:"aaceae74",5768:"c6cddc1b",5798:"1f38c802",5921:"c03e332d",5957:"fa91d560",5959:"2c9cf6b9",5981:"7422a2fc",6103:"ccc49370",6331:"8dc371f7",6513:"29edf7be",6526:"b513e9e6",6796:"cb6b1bc1",6855:"e6239798",6971:"c377a04b",7061:"91d11cc1",7074:"d3a91cf5",7138:"1098487f",7222:"7b6c4f42",7276:"c45b6a4b",7335:"929e5197",7524:"71a5ed2a",7664:"3e9bfc42",7783:"b811769a",7918:"17896441",7975:"9942b7e7",8124:"71aee7c4",8146:"e4b6a537",8180:"41e123a4",8199:"b2af1774",8209:"32f5b3c3",8547:"58dd7f5a",8610:"6875c492",8680:"4e8b8d1e",8863:"4c8314e9",8869:"e0c4e5d0",9036:"e2fa0b22",9477:"f3c6eb17",9514:"1be78505",9557:"95e41881",9640:"d9c6100b",9642:"7661071f",9666:"8756fe1b",9907:"1a5e942a",9924:"df203c0f",9945:"2143ccc1"}[e]||e)+"."+{3:"7ca0d240",53:"c25607c7",107:"a605bf3f",241:"a12864cc",691:"0fe74e06",837:"4de3a9f0",965:"97d57a2f",988:"a8ec3ef5",1170:"7dc1f5eb",1183:"a73b8022",1230:"8d909d09",1436:"b3a62480",1442:"f27c88bc",1478:"0411e9fb",1605:"8370a392",1650:"def48735",1740:"d3a923e2",1783:"ea98bece",1797:"3c71ae61",1884:"2d91abf5",1914:"10b2988c",2128:"7d150faf",2305:"089ab280",2365:"77be5f45",2372:"14d5f017",2478:"9309f537",2535:"694bf751",2623:"eace05cb",2786:"f03e6d26",2882:"4af7f00a",3033:"05791676",3085:"cee6b0a7",3089:"d8f5fae3",3387:"c3e2238c",3568:"094cb4ce",3608:"bfbe0831",3751:"2d017841",3802:"f9308062",3880:"d2836f24",3925:"daf9d3b9",3989:"64c6a77e",3998:"09bdb69a",4013:"339f7f50",4062:"9f911c15",4121:"1f1adf83",4134:"8a30d279",4138:"2e0fd830",4174:"9c20d296",4195:"74d3562f",4457:"f2265fd1",4594:"9c0ef8a0",4608:"9ada0877",4674:"bf29cac5",4751:"8df17737",5079:"c59b037f",5363:"08de3192",5540:"b9428e35",5675:"df47aeae",5768:"22f37bb2",5798:"c92a9893",5897:"e32e7a9e",5921:"b805646e",5957:"abb050a8",5959:"39e0131e",5981:"431511fa",6103:"4c1abde2",6331:"70a49cb5",6513:"88948983",6526:"4475b0cc",6796:"714df6b7",6855:"55c40fc8",6971:"440a6fd2",7061:"2295a04b",7074:"ffafb726",7138:"35a9bed2",7222:"f22368db",7276:"85b4859e",7335:"f1761094",7524:"a652df38",7664:"82021679",7783:"fa993d05",7918:"6bfaadf1",7975:"2b98fe47",8124:"6352f891",8146:"875c2a10",8180:"b228f34a",8199:"ca3b212f",8209:"99fd1569",8547:"9b07ae81",8610:"819a02ab",8680:"fe36e992",8863:"4fd78e62",8869:"d44ec2da",9036:"f6801510",9477:"3c25bbd5",9514:"bd6c0712",9557:"11c607de",9640:"8e0d82c2",9642:"e838fd79",9666:"28f9becd",9907:"6b0dfc22",9924:"b96aa40d",9945:"189ec5f0"}[e]+".js"},n.miniCssF=function(e){return"assets/css/styles.83d2e117.css"},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},a={},b="facebook:",n.l=function(e,c,f,d){if(a[e])a[e].push(c);else{var t,r;if(void 0!==f)for(var o=document.getElementsByTagName("script"),u=0;u=b)&&Object.keys(n.O).every((function(e){return n.O[e](f[r])}))?f.splice(r--,1):(t=!1,b0&&e[u-1][2]>b;u--)e[u]=e[u-1];e[u]=[f,a,b]},n.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(c,{a:c}),c},f=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},n.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var b=Object.create(null);n.r(b);var d={};c=c||[null,f({}),f([]),f(f)];for(var t=2&a&&e;"object"==typeof t&&!~c.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((function(c){d[c]=function(){return e[c]}}));return d.default=function(){return e},n.d(b,d),b},n.d=function(e,c){for(var f in c)n.o(c,f)&&!n.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:c[f]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(c,f){return n.f[f](e,c),c}),[]))},n.u=function(e){return"assets/js/"+({3:"675ef35d",53:"935f2afb",107:"1cb4cc54",241:"45df30ae",691:"9fcbb4d0",837:"48b25bf7",965:"5cc73787",988:"d41e4871",1170:"ad48a624",1183:"e26c4e66",1230:"4e42dfde",1436:"a7041dca",1442:"6584aacb",1478:"16343866",1605:"f4378185",1650:"471e6807",1740:"7e2792ca",1783:"abb1f4f7",1797:"c89b7122",1884:"2dbf55b1",1914:"d9f32620",2128:"0b5f7c33",2305:"a3117be4",2365:"b73d9758",2372:"a5ac18f0",2478:"cd9491a5",2535:"814f3328",2623:"7c778111",2786:"ff783d96",2882:"d03bdc50",3033:"713f5220",3085:"1f391b9e",3089:"a6aa9e1f",3387:"ea914be7",3568:"3c17bc19",3608:"9e4087bc",3751:"3720c009",3802:"9f343eac",3880:"6b1634f5",3925:"3fb8b2ea",3989:"e751dc84",3998:"f51ad1b9",4013:"01a85c17",4062:"f0d4968a",4121:"55960ee5",4134:"1947366a",4138:"d7ee6b6b",4174:"299c1e39",4195:"c4f5d8e4",4457:"0d43c417",4594:"6325aefb",4674:"d6ee146c",4751:"dbe88bca",5079:"52c07581",5363:"ff608c85",5540:"b141c4dc",5675:"aaceae74",5768:"c6cddc1b",5798:"1f38c802",5921:"c03e332d",5957:"fa91d560",5959:"2c9cf6b9",5981:"7422a2fc",6103:"ccc49370",6331:"8dc371f7",6513:"29edf7be",6526:"b513e9e6",6796:"cb6b1bc1",6855:"e6239798",6971:"c377a04b",7061:"91d11cc1",7074:"d3a91cf5",7138:"1098487f",7222:"7b6c4f42",7276:"c45b6a4b",7335:"929e5197",7524:"71a5ed2a",7664:"3e9bfc42",7783:"b811769a",7918:"17896441",7975:"9942b7e7",8124:"71aee7c4",8146:"e4b6a537",8180:"41e123a4",8199:"b2af1774",8209:"32f5b3c3",8547:"58dd7f5a",8610:"6875c492",8680:"4e8b8d1e",8863:"4c8314e9",8869:"e0c4e5d0",9036:"e2fa0b22",9477:"f3c6eb17",9514:"1be78505",9557:"95e41881",9640:"d9c6100b",9642:"7661071f",9666:"8756fe1b",9907:"1a5e942a",9924:"df203c0f",9945:"2143ccc1"}[e]||e)+"."+{3:"44e25294",53:"c25607c7",107:"a605bf3f",241:"a12864cc",691:"0fe74e06",837:"4de3a9f0",965:"97d57a2f",988:"a8ec3ef5",1170:"7dc1f5eb",1183:"a73b8022",1230:"8d909d09",1436:"b3a62480",1442:"f27c88bc",1478:"0411e9fb",1605:"8370a392",1650:"def48735",1740:"d3a923e2",1783:"ea98bece",1797:"3c71ae61",1884:"2d91abf5",1914:"10b2988c",2128:"7d150faf",2305:"089ab280",2365:"77be5f45",2372:"14d5f017",2478:"9309f537",2535:"694bf751",2623:"eace05cb",2786:"f03e6d26",2882:"4af7f00a",3033:"05791676",3085:"cee6b0a7",3089:"d8f5fae3",3387:"c3e2238c",3568:"094cb4ce",3608:"bfbe0831",3751:"2d017841",3802:"f9308062",3880:"d2836f24",3925:"daf9d3b9",3989:"64c6a77e",3998:"09bdb69a",4013:"339f7f50",4062:"9f911c15",4121:"1f1adf83",4134:"8a30d279",4138:"2e0fd830",4174:"9c20d296",4195:"74d3562f",4457:"f2265fd1",4594:"9c0ef8a0",4608:"9ada0877",4674:"bf29cac5",4751:"8df17737",5079:"c59b037f",5363:"08de3192",5540:"b9428e35",5675:"df47aeae",5768:"22f37bb2",5798:"c92a9893",5897:"e32e7a9e",5921:"b805646e",5957:"abb050a8",5959:"39e0131e",5981:"431511fa",6103:"4c1abde2",6331:"70a49cb5",6513:"88948983",6526:"4475b0cc",6796:"714df6b7",6855:"55c40fc8",6971:"440a6fd2",7061:"2295a04b",7074:"ffafb726",7138:"35a9bed2",7222:"f22368db",7276:"85b4859e",7335:"f1761094",7524:"a652df38",7664:"82021679",7783:"fa993d05",7918:"6bfaadf1",7975:"2b98fe47",8124:"6352f891",8146:"875c2a10",8180:"b228f34a",8199:"ca3b212f",8209:"99fd1569",8547:"9b07ae81",8610:"819a02ab",8680:"fe36e992",8863:"4fd78e62",8869:"d44ec2da",9036:"f6801510",9477:"3c25bbd5",9514:"bd6c0712",9557:"11c607de",9640:"8e0d82c2",9642:"e838fd79",9666:"28f9becd",9907:"6b0dfc22",9924:"b96aa40d",9945:"189ec5f0"}[e]+".js"},n.miniCssF=function(e){return"assets/css/styles.83d2e117.css"},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},a={},b="facebook:",n.l=function(e,c,f,d){if(a[e])a[e].push(c);else{var t,r;if(void 0!==f)for(var o=document.getElementsByTagName("script"),u=0;u Archive | Cloud & DevOps - +

Archive

Archive

- + \ No newline at end of file diff --git a/blog/index.html b/blog/index.html index 22864ac0..e6e98ec7 100644 --- a/blog/index.html +++ b/blog/index.html @@ -6,13 +6,13 @@ Blog | Cloud & DevOps - +
- + \ No newline at end of file diff --git a/blog/tags/devops/index.html b/blog/tags/devops/index.html index 1cf1b5ea..9a9c6b4f 100644 --- a/blog/tags/devops/index.html +++ b/blog/tags/devops/index.html @@ -6,13 +6,13 @@ One post tagged with "devops" | Cloud & DevOps - +

One post tagged with "devops"

View All Tags
- + \ No newline at end of file diff --git a/blog/tags/index.html b/blog/tags/index.html index c9a2ca11..2efe9fb9 100644 --- a/blog/tags/index.html +++ b/blog/tags/index.html @@ -6,13 +6,13 @@ Tags | Cloud & DevOps - +

Tags

- + \ No newline at end of file diff --git a/blog/welcome/index.html b/blog/welcome/index.html index 69cdbdbf..b232023f 100644 --- a/blog/welcome/index.html +++ b/blog/welcome/index.html @@ -6,13 +6,13 @@ Welcome | Cloud & DevOps - +
- + \ No newline at end of file diff --git a/docs/cloud/aws/index.html b/docs/cloud/aws/index.html index 4ac2dd19..dd378d38 100644 --- a/docs/cloud/aws/index.html +++ b/docs/cloud/aws/index.html @@ -6,13 +6,13 @@ Amazon Web Srvice (AWS) | Cloud & DevOps - +

Amazon Web Srvice (AWS)

Install AWS Cli​

Install Latest version of AWS CLI( > 2.0)

Generate Access key and Secret key in AWS Console​

Login​

Login in Windows OS​

Authenticate
aws configure set aws_access_key_id "${AWS_ACCESS_KEY_ID}"
aws configure set aws_secret_access_key "${AWS_SECRET_ACCESS_KEY}"
aws configure set region "${DEFAULT_REGION_NAME}"

or just run aws configure command in console. It will ask althe required values to authenticate.

Credentials profile​

The credentials file uses a different naming format than the AWS CLI config file for named profiles. Do not use the word profile when creating an entry in the credentials file.

~/.aws/credentials (Linux & Mac) or %USERPROFILE%.aws\credentials (Windows)


[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

[user1]
aws_access_key_id=AKIAI44QH8DHBEXAMPLE
aws_secret_access_key=je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY

Config profile​

~/.aws/config (Linux & Mac) or %USERPROFILE%.aws\config (Windows)

[default]
region=us-west-2
output=json

[profile user1]
region=us-east-1
output=text

Login in Linux / Other OS​

TODO

- + \ No newline at end of file diff --git a/docs/cloud/azure/index.html b/docs/cloud/azure/index.html index 15195eb5..4cacb702 100644 --- a/docs/cloud/azure/index.html +++ b/docs/cloud/azure/index.html @@ -6,13 +6,13 @@ Microsoft Azure | Cloud & DevOps - +

Microsoft Azure

Install Azure Cli​

Login​

Azure Cli command to login in azure cloud
az login
(or)
az login -u <username> -p <password>
(or)
az login --service-principal -u <app-id> -p <password-or-cert> --tenant <tenant>
(or)
az login --identity
(or)
az login --identity --username <client_id|object_id|resource_id>

Create service principle​

Azure Active Directory​

App Registration -> [Your App] -> Manage -> Authentication -> Add a Platform => Mobile and desktop applications

using Microsoft.Identity.Client;
using static System.Console;

string clientId = "<ApplicationID / ClientID>";

var app = PublicClientApplicationBuilder
.Create(clientId)
.WithRedirectUri("http://localhost")
.Build();

string[] scopes = { "https://database.windows.net/.default" };

var result = await app
.AcquireTokenInteractive(scopes)
.ExecuteAsync();

WriteLine(result.AccessToken);
- + \ No newline at end of file diff --git a/docs/cloud/cloud-design-pattern/index.html b/docs/cloud/cloud-design-pattern/index.html index b46e364c..20fdec0a 100644 --- a/docs/cloud/cloud-design-pattern/index.html +++ b/docs/cloud/cloud-design-pattern/index.html @@ -6,13 +6,13 @@ Cloud Design Pattern | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/cloud/gcp/index.html b/docs/cloud/gcp/index.html index ce29bf82..47908f6c 100644 --- a/docs/cloud/gcp/index.html +++ b/docs/cloud/gcp/index.html @@ -6,13 +6,13 @@ Google Cloud Provider (GCP) | Cloud & DevOps - +

Google Cloud Provider (GCP)

Install Google Cloud Cli​

Windows OS​

Run in Powershell
(New-Object Net.WebClient).DownloadFile("https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe", "$env:Temp\GoogleCloudSDKInstaller.exe")

& $env:Temp\GoogleCloudSDKInstaller.exe

Linux / Other OS​

Install GCP Cli in Linux

Login​

Console Login​


gcloud init # Login window open in browser
gcloud init --console-only # `--console-only` flag to prevent the command from launching a browser-based authorization flow, if required

Login using Service Account​

  1. Create the service Account
  2. Open the Service account and navigate to KEYS tab and click AddKey -> Create new key option.
  3. Select Json/P12 formate and click create button. It will download serviceaccount.json file.
# Login

gcloud auth activate-service-account --key-file serviceaccount.json

# List

gcloud auth list
tip

Before access any service in GCP, please enable the appropriate API and provide the required permission to service account

SSH Config​

Copy the SSH Key from GCP -> Compute Engine -> Settings -> Metadata -> SSH Keys. If there no key available, generate new one with the below command and add the public key into SSH Keys.

Generate SSH key
ssh-keygen -t rsa -f ~/.ssh/<ssh-file-name> -C <UserName> -b 2048   # Linux
ssh-keygen -t rsa -f ./<ssh-file-name> -C <UserName> -b 2048 # Windows
- + \ No newline at end of file diff --git a/docs/frameworks/angular/index.html b/docs/frameworks/angular/index.html index 430210a5..08b7b65c 100644 --- a/docs/frameworks/angular/index.html +++ b/docs/frameworks/angular/index.html @@ -6,13 +6,13 @@ Angular | Cloud & DevOps - +

Angular

Known to compile/build Errors​

JavaScript heap out of memory Error​

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Set the following environment variable to resolve the javascript heap out of memory.

ENV NODE_OPTIONS=--max_old_space_size=2048

Angular Build and Deployment in Gihtub Actions​

Angular Dashboard References​

  1. Vex
  2. Gene
  3. CreateTim
  4. NG Matero 1NG Matero 2
- + \ No newline at end of file diff --git a/docs/frameworks/dotnet/index.html b/docs/frameworks/dotnet/index.html index 21cc2432..80bc20ec 100644 --- a/docs/frameworks/dotnet/index.html +++ b/docs/frameworks/dotnet/index.html @@ -6,13 +6,13 @@ Microsoft Dotnet | Cloud & DevOps - +

Dotnet

Compilation

Single file​

  1. Single File App in Dotnet 6

Awesome Dotnet​

  1. Query Builder sqlkata
  2. OPEN API swashbuckle
  3. Mediator MediatR
  4. CQRS CQRS
  5. Sample Dotnet Project Best Practice

Github Actions to build Dotnet 7 project​

Operating System

This github actions runs on windows-latest OS.

name: SAST With Sonar Cloud

on:
push:
branches: ["feature/*"]
pull_request:
branches: ["main"]
workflow_dispatch:

jobs:
sast:
name: Static Application Security Testing
runs-on: windows-latest
steps:
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: "microsoft"
java-version: 11

- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache SonarQube packages
uses: actions/cache@v3
with:
path: ~/sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache SonarQube scanner
id: cache-sonar-scanner
uses: actions/cache@v3
with:
path: ./.sonar/scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner

- name: Install SonarQube scanner
shell: powershell
run: dotnet tool update --global dotnet-sonarscanner --version 5.12.0

- name: Install Dotnet Coverage tool
shell: powershell
run: dotnet tool update --global dotnet-coverage --version 17.4.4

- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
dotnet tool list -g
dotnet build --no-incremental
dotnet coverage collect "dotnet test" -f xml -o "coverage.xml"
dotnet sonarscanner begin /k:"<project-key>" /o:"<org-name>" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml /d:sonar.host.url="https://sonarcloud.io"
dotnet build --no-incremental
dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
- + \ No newline at end of file diff --git a/docs/frameworks/nodejs/index.html b/docs/frameworks/nodejs/index.html index 88cad920..f929bbb8 100644 --- a/docs/frameworks/nodejs/index.html +++ b/docs/frameworks/nodejs/index.html @@ -6,13 +6,13 @@ Node Js | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/frameworks/react/index.html b/docs/frameworks/react/index.html index d9c6db0f..ada3b411 100644 --- a/docs/frameworks/react/index.html +++ b/docs/frameworks/react/index.html @@ -6,13 +6,13 @@ React | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/frameworks/spring-boot/index.html b/docs/frameworks/spring-boot/index.html index 73ecb876..554b3554 100644 --- a/docs/frameworks/spring-boot/index.html +++ b/docs/frameworks/spring-boot/index.html @@ -6,13 +6,13 @@ Spring Boot | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/introduction/index.html b/docs/introduction/index.html index 3f1df3dc..603b079c 100644 --- a/docs/introduction/index.html +++ b/docs/introduction/index.html @@ -6,13 +6,13 @@ Introduction | Cloud & DevOps - +
- + \ No newline at end of file diff --git a/docs/operating-system/alpine/index.html b/docs/operating-system/alpine/index.html index 12032ad9..48cfee72 100644 --- a/docs/operating-system/alpine/index.html +++ b/docs/operating-system/alpine/index.html @@ -6,13 +6,13 @@ Alpine | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/operating-system/debian/index.html b/docs/operating-system/debian/index.html index 92a98bbe..c04d2f28 100644 --- a/docs/operating-system/debian/index.html +++ b/docs/operating-system/debian/index.html @@ -6,13 +6,13 @@ Debian | Cloud & DevOps - +

Debian

Package Manager​

apt update
apt-get update

# Search apt package
apt-cache search --names-only '^openjdk-8*'

Reusable terminal Commands​

# General
sudo sh # switch to root user
cat /etc/passwd # List all users
pwd # Current working Directory
sudo passwd root # Reset root user password

# Service Commands
sudo service ssh status # Check the status of the service
sudo service ssh start # Start the service
sudo service ssh restart # Restart the service

# Other Service Commands
{start|stop|reload|force-reload|restart|try-restart|status}

# systemctl commands
sudo systemctl status ssh # Status of SSH service
sudo systemctl status --help # Help page

# Firewall and Security Settings
sudo ufw enable # Enable firewall
sudo ufw status # Check the firewall status for all the ports
sudo ufw allow ssh # Allow SSH ports

# User Add/update
sudo useradd <username> <groupname> # Add new user without Home directory. Ex. "sudo useradd foo sudo" (or) "sudo adduser foo -G sudo"; useradd/adduser both are correct.
useradd -m -d /PATH/TO/FOLDER <username> # Add new user with Home directory. -m for Home dir, -d for home dir path
passwd <username> # Set the password for a user
sudo deluser <username> # Remove User
sudo deluser --remove-home <username> # Remove user including home directory.
usermod -aG sudo <username> # Add user to sudo group.

# Get VM Details
cat /etc/os-release
[lsblk](https://www.cyberciti.biz/faq/find-hard-disk-hardware-specs-on-linux/)
lsblk -f # List all disks
sudo blkid
sudo mkfs -t ext4 /dev/sdb1 # Format to EXT4. Run with caution.
sudo mount /dev/sdb1 /mnt/media # Mount Disk to OS path
sudo umount DIRECTORY # Unmount Directory
sudo umount DEVICE_NAME # Unmount Device

# symlink
sudo rm -f /sbin/mkfs.ntfs # Remove symlink
sudo ln -s /sbin/mkntfs /sbin/mkfs.ntfs # Create symlink

Permanent mount

The following line must be added to the /etc/fstab file to automatically the hard disk re-mount after the next restart.

/dev/sdb     /media/sda3     ext4    rw              0       0
- + \ No newline at end of file diff --git a/docs/operating-system/ubuntu/index.html b/docs/operating-system/ubuntu/index.html index 2636a118..480a573a 100644 --- a/docs/operating-system/ubuntu/index.html +++ b/docs/operating-system/ubuntu/index.html @@ -6,13 +6,13 @@ Ubuntu | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/operating-system/windows/index.html b/docs/operating-system/windows/index.html index 099f15a2..139d6162 100644 --- a/docs/operating-system/windows/index.html +++ b/docs/operating-system/windows/index.html @@ -6,13 +6,13 @@ Windows | Cloud & DevOps - +

Windows

Domain Controller Creation​

  1. Server Manager -> Add Roles and Features -> Instalation Type -> Role based or feature based Instalation -> Server Roles -> Active Directory Domain Services -> Add Features -> Restart the detination server if required -> Install

Active Directory Domain Controller Configuration​

Enable Multiple RDP Sessions in Windows Server OS​

  1. Windows Run -> gpedit.msc
  2. Go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.
  3. Set Restrict Remote Desktop Services user to a single Remote Desktop Services session to Disabled.
  4. Double click Limit number of connections and set the RD Maximum Connections allowed to 999999.

Windows Commands​


ping google.com # lookup domain name
nslookup google.com # Reverse lookup domain name

- + \ No newline at end of file diff --git a/docs/pipeline/bitbucket-pipeline/index.html b/docs/pipeline/bitbucket-pipeline/index.html index 36b1b9a1..330cfa07 100644 --- a/docs/pipeline/bitbucket-pipeline/index.html +++ b/docs/pipeline/bitbucket-pipeline/index.html @@ -6,13 +6,13 @@ Bitbucket Pipeline | Cloud & DevOps - +

Bitbucket Pipeline

Generate BITBUCKET_ACCESS_TOKEN in Bitbucket​

Bitbucket pipeline Samples​

Deploy into AWS ECS Cluster​

image: python:2.7

pipelines:
branches:
'{master,develop}':
- step:
name: Build and Containerize the App
services:
- docker
trigger: manual
script:
- docker build -t <docker-image-name> .
default:
- step:
name: Build and Containerize the App
services:
- docker
caches:
- docker
script:
- pip install --upgrade awscli==1.14.5 s3cmd==2.0.1 python-magic
- aws configure set aws_access_key_id "${AWS_ACCESS_KEY_ID}"
- aws configure set aws_secret_access_key "${AWS_SECRET_ACCESS_KEY}"
- aws configure set region "${DEFAULT_REGION_NAME}"
- eval $(aws ecr get-login --no-include-email --region "${DEFAULT_REGION_NAME}")
- docker build -t <docker-image-name> .
- docker tag <docker-image-name>:latest <aws-ecr-path>/<docker-image-name>:latest
- docker push <aws-ecr-path>/<docker-image-name>:latest
- aws ecs update-service --cluster <ecs-forgate-cluster-name> --service <ecs-service-name> --task-definition <ecs-task-definition-name[:version]> --force-new-deployment
definitions:
services:
docker:
memory: 2048

Template based Pipeline yml 1​


image: maven:3.8.1-jdk-8

definitions:
steps:
- step: &Build-App
name: Build App
caches:
- maven
script:
- mvn install
artifacts:
- target/**
- step: &Release-App
name: Release App
caches:
- maven
script:
- mvn release:update-versions --batch-mode
- mvn install
- git add .
- git commit -m "[skip CI]"
- git push
artifacts:
- target/**
- step: &Deploy-2-Github
name: Deploy to Github
deployment: Production
script:
- git config --global user.email "developer@mission.io"
- git config --global user.name "BB Build Trigger"
- git clone https://${GIT_ACCESS_TOKEN}@github.com/mission/Spacex
- ls -ls
- cd Spacex
- git checkout main
- cp ../target/Spacex-*-SNAPSHOT.jar .
- cp ../README.md .
- git add .
- git status
- git commit -m "Latest jar updated. Build Number ${BITBUCKET_BUILD_NUMBER}"
- git push origin main
pipelines:
branches:
develop:
- step: *Build-App
release:
- step: *Release-App
- step: *Deploy-2-Github
feature/cicd:
- step: *Release-App
- step: *Deploy-2-Github

Bitbucket Tips

git commit -m "[skip CI]"

Template based Pipeline yml 2​

It covers the following

  1. Maven build
  2. Enable the Maven Cache (ref)
  3. Push the artifacts to github
  4. How to skip build if we commit the verson change from CI process
  5. Bitbucket shared/reuse stepes (ref) & scripts (ref)
  6. Security Scan
  7. File Upload and Download from Bitbucket download sections.
  8. Install maven dependencies
image: maven:3.8.1-jdk-8

definitions:
scripts:
- script: &Build-Script
mvn install

- script: &CommitVersion-Script
git add . &&
git status &&
git commit -m "[skip CI]" &&
git push

- script: &DependencyDownload-Script
curl -s -S --user "${BITBUCKET_ACCESS_TOKEN}" -L -O "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads/AppEvaluateCore-5.0.${BITBUCKET_BUILD_NUMBER}-SNAPSHOT.jar" &&
curl -s -S --user "${BITBUCKET_ACCESS_TOKEN}" -L -O "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads/app-authentication-2.0.0.jar" &&
ls -ls

- script: &DependencyInstall-Script
mvn install:install-file -Dfile=./mission-authentication-2.0.0.jar -DgroupId=com.Mission.authentication -DartifactId=mission-authentication -Dversion=2.0.0 -Dpackaging=jar -DgeneratePom=true &&
mvn install:install-file -Dfile=./AppEvaluateCore-5.0.${BITBUCKET_BUILD_NUMBER}-SNAPSHOT.jar -DgroupId=com.mio -DartifactId=AppEvaluateCore -Dversion=5.0.${BITBUCKET_BUILD_NUMBER}-SNAPSHOT -Dpackaging=jar -DgeneratePom=true

steps:
- step: &Build-Authentication
name: Build Authentication
caches:
- maven
script:
- pwd
- ls -ls
- git clone https://${BITBUCKET_ACCESS_TOKEN}@bitbucket.org/MissionOrg/mission-authentication.git
- cd mission-authentication
- git checkout develop
- *Build-Script
#- mvn install:install-file -Dfile=./target/mission-authentication-2.0.0.jar -DgroupId=com.Mission.authentication -DartifactId=mission-authentication -Dversion=2.0.0 -Dpackaging=jar -DgeneratePom=true
- curl -X POST --user "${BITBUCKET_ACCESS_TOKEN}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"./target/mission-authentication-2.0.0.jar"
artifacts:
- target/**
- step: &Build-Backend
name: Build Backend
caches:
- maven
script:
- pwd
- ls -ls
- mkdir bin
- cd bin
- curl -s -S --user "${BITBUCKET_ACCESS_TOKEN}" -L -O "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads/mission-authentication-2.0.0.jar" &&
- mvn install:install-file -Dfile=./mission-authentication-2.0.0.jar -DgroupId=com.Mission.authentication -DartifactId=mission-authentication -Dversion=2.0.0 -Dpackaging=jar -DgeneratePom=true &&
- cd ..
- git clone https://${BITBUCKET_ACCESS_TOKEN}@bitbucket.org/MissionOrg/application-cloud-transformation-evaluate-backend.git
- cd application-cloud-transformation-evaluate-backend
- git checkout develop
- mvn versions:set -DnewVersion=5.0.${BITBUCKET_BUILD_NUMBER}-SNAPSHOT
- *Build-Script
- cd target
- ls -ls
- echo ${BITBUCKET_BUILD_NUMBER}
#- mvn install:install-file -Dfile=./target/MissionEvaluateCore-5.0.${BITBUCKET_BUILD_NUMBER}-SNAPSHOT.jar -DgroupId=com.mio -DartifactId=MissionEvaluateCore -Dversion=5.0.${BITBUCKET_BUILD_NUMBER}-SNAPSHOT -Dpackaging=jar -DgeneratePom=true
- curl -X POST -s --user "${BITBUCKET_ACCESS_TOKEN}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"./target/MissionEvaluateCore-5.0.45-SNAPSHOT.jar"
- *CommitVersion-Script
artifacts:
- target/**
- step: &Build-UI
name: Build UI
caches:
- maven
script:
- mkdir bin
- cd bin
- *DependencyDownload-Script
- *DependencyInstall-Script
- cd ..
- *Build-Script
after-script:
# Collect checkstyle results, if any, and convert to Bitbucket Code Insights.
- pipe: atlassian/checkstyle-report:0.3.0
artifacts:
- target/**
- step: &Release-UI
name: Release UI
caches:
- maven
script:
- pwd
- ls -ls
- mkdir bin
- cd bin
- *DependencyDownload-Script
- *DependencyInstall-Script
- cd ..
- mvn release:update-versions --batch-mode
- *Build-Script
- *CommitVersion-Script
after-script:
# Collect checkstyle results, if any, and convert to Bitbucket Code Insights.
- pipe: atlassian/checkstyle-report:0.3.0
artifacts:
- target/**
- step: &Push-2-Github
name: Push to Github
deployment: Production
script:
- git config --global user.email "natarajang2@Mission.com"
- git config --global user.name "Bitbucket Build Trigger"
- git clone https://${GIT_ACCESS_TOKEN}@github.com/NatarajanGanapathi-Mission/MissionEvaluateWorkspace
- ls -ls
- cd MissionEvaluateWorkspace
- git checkout main
- cp ../target/MissionEvaluate-*-SNAPSHOT.jar .
- cp ../README.md .
- git add .
- git status
- git commit -m "Latest jar updated. Build Number ${BITBUCKET_BUILD_NUMBER}"
- git push origin main
- step: &Security-Scan
name: Security Scan
script:
# Run a security scan for sensitive data.
# See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security
- pipe: atlassian/git-secrets-scan:0.5.1

pipelines:
branches:
develop:
- step: *Build-Authentication
- step: *Build-Backend
- step: *Build-UI
- step: *Security-Scan
feature/cicd:
- step: *Build-Authentication
- step: *Build-Backend
- step: *Build-UI
- step: *Security-Scan

- + \ No newline at end of file diff --git a/docs/pipeline/github-actions/index.html b/docs/pipeline/github-actions/index.html index 7aaba1a1..5e8ab896 100644 --- a/docs/pipeline/github-actions/index.html +++ b/docs/pipeline/github-actions/index.html @@ -6,13 +6,13 @@ Github Actions | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/pipeline/gitlab/index.html b/docs/pipeline/gitlab/index.html index 743df13d..2fe2d9fe 100644 --- a/docs/pipeline/gitlab/index.html +++ b/docs/pipeline/gitlab/index.html @@ -6,13 +6,13 @@ GitLab | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/pipeline/jenkins/index.html b/docs/pipeline/jenkins/index.html index 9a6a3f3a..4f0c3c9f 100644 --- a/docs/pipeline/jenkins/index.html +++ b/docs/pipeline/jenkins/index.html @@ -6,13 +6,13 @@ Jenkins | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/program-language/csharp/index.html b/docs/program-language/csharp/index.html index 591ba79a..20323182 100644 --- a/docs/program-language/csharp/index.html +++ b/docs/program-language/csharp/index.html @@ -6,13 +6,13 @@ CSharp (C#) | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/program-language/java/index.html b/docs/program-language/java/index.html index a012ecde..9f379bb9 100644 --- a/docs/program-language/java/index.html +++ b/docs/program-language/java/index.html @@ -6,13 +6,13 @@ Java | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/program-language/nodejs/index.html b/docs/program-language/nodejs/index.html index e5802ba1..fbbea7fe 100644 --- a/docs/program-language/nodejs/index.html +++ b/docs/program-language/nodejs/index.html @@ -6,13 +6,13 @@ NodeJs | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/program-language/python/index.html b/docs/program-language/python/index.html index 617760c9..db1ff5d9 100644 --- a/docs/program-language/python/index.html +++ b/docs/program-language/python/index.html @@ -6,13 +6,13 @@ Python | Cloud & DevOps - +

Python

Deeplearning Setup in Mac​

brew cask install anaconda

update ~/.bash_profile​

export PATH="/usr/local/anaconda3/bin:$PATH"

Install the following packages​

conda install jupyter
conda install numpy
conda install pandas
conda install scikit-learn
conda install matplotlib
pip install --upgrade tensorflow

Run Jupyter​

jupyter notebook
- + \ No newline at end of file diff --git a/docs/program-language/rust/index.html b/docs/program-language/rust/index.html index f18446f3..a5abf61c 100644 --- a/docs/program-language/rust/index.html +++ b/docs/program-language/rust/index.html @@ -6,13 +6,13 @@ Rust | Cloud & DevOps - +

Rust

Install Rust​

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install Rust Nightly build​

rustup install nightly

Debug Rust source code in VS Code​

  1. Install VS Code Plugin C/C++ for Windows / CodeLLDB for (OS X / Linux) for native code debugging.
  2. Add "debug.allowBreakpointsEverywhere": true in .vscode -> settings.json file

Other VSCode Tools for Rust​

  1. Racer - code completion for Rust

Build​

Build the rust application and create the Docker image.

Set nightly to work with latest version​


Cargo Commands​

Create Workspace (Manual process)​

Filename: Cargo.toml

[workspace]

members = [
"binary-name",
"library-name"
]

Please gothrough the actix git repo for sample project.

Create Project​

# Creating binary
cargo new <package-name>

# Creating library
cargo new <library-name> --lib

Build the application​

cargo build

# Build spacific package
cargo build -p <package-name>

Run the application​

cargo run -p <package-name>
#example
cargo run -p mission-cli

Run the test​

cargo test

# Test perticular package
cargo test -p <package-name>
- + \ No newline at end of file diff --git a/docs/tags/alpine/index.html b/docs/tags/alpine/index.html index 9cec9eb7..d99ba0ca 100644 --- a/docs/tags/alpine/index.html +++ b/docs/tags/alpine/index.html @@ -6,13 +6,13 @@ One doc tagged with "alpine" | Cloud & DevOps - +

One doc tagged with "alpine"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/angular/index.html b/docs/tags/angular/index.html index 2e0aa794..5983c978 100644 --- a/docs/tags/angular/index.html +++ b/docs/tags/angular/index.html @@ -6,13 +6,13 @@ 2 docs tagged with "angular" | Cloud & DevOps - +

2 docs tagged with "angular"

View All Tags

Angular

Known to compile/build Errors

- + \ No newline at end of file diff --git a/docs/tags/ansible/index.html b/docs/tags/ansible/index.html index b66766f2..8bbf24e7 100644 --- a/docs/tags/ansible/index.html +++ b/docs/tags/ansible/index.html @@ -6,13 +6,13 @@ 4 docs tagged with "ansible" | Cloud & DevOps - +

4 docs tagged with "ansible"

View All Tags

Ansible

Setup Ansible Controle panel

SSH

Create SSH Key

Terraform

Workspace based terraform automation project setup for multi-cloud.

- + \ No newline at end of file diff --git a/docs/tags/aws/index.html b/docs/tags/aws/index.html index a70b3077..5fe51b91 100644 --- a/docs/tags/aws/index.html +++ b/docs/tags/aws/index.html @@ -6,13 +6,13 @@ 4 docs tagged with "aws" | Cloud & DevOps - +

4 docs tagged with "aws"

View All Tags

SSH

Create SSH Key

Terraform

Workspace based terraform automation project setup for multi-cloud.

- + \ No newline at end of file diff --git a/docs/tags/azure/index.html b/docs/tags/azure/index.html index 08d65996..8ccda3b2 100644 --- a/docs/tags/azure/index.html +++ b/docs/tags/azure/index.html @@ -6,13 +6,13 @@ 4 docs tagged with "azure" | Cloud & DevOps - +

4 docs tagged with "azure"

View All Tags

SSH

Create SSH Key

Terraform

Workspace based terraform automation project setup for multi-cloud.

- + \ No newline at end of file diff --git a/docs/tags/bash/index.html b/docs/tags/bash/index.html index edc83a80..7c74d6ea 100644 --- a/docs/tags/bash/index.html +++ b/docs/tags/bash/index.html @@ -6,13 +6,13 @@ One doc tagged with "bash" | Cloud & DevOps - +

One doc tagged with "bash"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/bitbucket-pipeline/index.html b/docs/tags/bitbucket-pipeline/index.html index 246d416a..162e149b 100644 --- a/docs/tags/bitbucket-pipeline/index.html +++ b/docs/tags/bitbucket-pipeline/index.html @@ -6,13 +6,13 @@ One doc tagged with "bitbucket-pipeline" | Cloud & DevOps - +

One doc tagged with "bitbucket-pipeline"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/bitbucket/index.html b/docs/tags/bitbucket/index.html index 4983a36b..935439c6 100644 --- a/docs/tags/bitbucket/index.html +++ b/docs/tags/bitbucket/index.html @@ -6,13 +6,13 @@ One doc tagged with "bitbucket" | Cloud & DevOps - +

One doc tagged with "bitbucket"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/c/index.html b/docs/tags/c/index.html index 89d9634e..d6d60697 100644 --- a/docs/tags/c/index.html +++ b/docs/tags/c/index.html @@ -6,13 +6,13 @@ One doc tagged with "C#" | Cloud & DevOps - +

One doc tagged with "C#"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/cloud-design-pattern/index.html b/docs/tags/cloud-design-pattern/index.html index da7a142f..bbd1a014 100644 --- a/docs/tags/cloud-design-pattern/index.html +++ b/docs/tags/cloud-design-pattern/index.html @@ -6,13 +6,13 @@ One doc tagged with "cloud design pattern" | Cloud & DevOps - +

One doc tagged with "cloud design pattern"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/container/index.html b/docs/tags/container/index.html index f48d70cb..80cf7a60 100644 --- a/docs/tags/container/index.html +++ b/docs/tags/container/index.html @@ -6,13 +6,13 @@ 3 docs tagged with "container" | Cloud & DevOps - +

3 docs tagged with "container"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/csharp/index.html b/docs/tags/csharp/index.html index 57e055fe..ceca7fac 100644 --- a/docs/tags/csharp/index.html +++ b/docs/tags/csharp/index.html @@ -6,13 +6,13 @@ One doc tagged with "csharp" | Cloud & DevOps - +

One doc tagged with "csharp"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/debian/index.html b/docs/tags/debian/index.html index 7021b8e7..d0fce67b 100644 --- a/docs/tags/debian/index.html +++ b/docs/tags/debian/index.html @@ -6,13 +6,13 @@ One doc tagged with "debian" | Cloud & DevOps - +

One doc tagged with "debian"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/docker/index.html b/docs/tags/docker/index.html index fc5a4bdd..bd4beb05 100644 --- a/docs/tags/docker/index.html +++ b/docs/tags/docker/index.html @@ -6,13 +6,13 @@ One doc tagged with "docker" | Cloud & DevOps - +

One doc tagged with "docker"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/dotnet/index.html b/docs/tags/dotnet/index.html index c21a9733..bebbb369 100644 --- a/docs/tags/dotnet/index.html +++ b/docs/tags/dotnet/index.html @@ -6,13 +6,13 @@ 3 docs tagged with "dotnet" | Cloud & DevOps - +

3 docs tagged with "dotnet"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/dotnetcore/index.html b/docs/tags/dotnetcore/index.html index ec1d471b..8b4318a0 100644 --- a/docs/tags/dotnetcore/index.html +++ b/docs/tags/dotnetcore/index.html @@ -6,13 +6,13 @@ One doc tagged with "dotnetcore" | Cloud & DevOps - +

One doc tagged with "dotnetcore"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/gcp/index.html b/docs/tags/gcp/index.html index ae950e7e..6c1c0526 100644 --- a/docs/tags/gcp/index.html +++ b/docs/tags/gcp/index.html @@ -6,13 +6,13 @@ 4 docs tagged with "gcp" | Cloud & DevOps - +

4 docs tagged with "gcp"

View All Tags

SSH

Create SSH Key

Terraform

Workspace based terraform automation project setup for multi-cloud.

- + \ No newline at end of file diff --git a/docs/tags/git/index.html b/docs/tags/git/index.html index 7e0fb91d..d90e1a2a 100644 --- a/docs/tags/git/index.html +++ b/docs/tags/git/index.html @@ -6,13 +6,13 @@ 2 docs tagged with "git" | Cloud & DevOps - +

2 docs tagged with "git"

View All Tags

Git

Rollback last commit in a local git repository

Husky

1. Sample Husky Implementation reference

- + \ No newline at end of file diff --git a/docs/tags/github-actions/index.html b/docs/tags/github-actions/index.html index f3c8e5f8..ddf1deea 100644 --- a/docs/tags/github-actions/index.html +++ b/docs/tags/github-actions/index.html @@ -6,13 +6,13 @@ One doc tagged with "github-actions" | Cloud & DevOps - +

One doc tagged with "github-actions"

View All Tags

Github Actions

Angular Gihtub Actions to build and Deploy the app Reference

- + \ No newline at end of file diff --git a/docs/tags/github/index.html b/docs/tags/github/index.html index eaa44cba..ddfbeee2 100644 --- a/docs/tags/github/index.html +++ b/docs/tags/github/index.html @@ -6,13 +6,13 @@ One doc tagged with "github" | Cloud & DevOps - +

One doc tagged with "github"

View All Tags

Github Actions

Angular Gihtub Actions to build and Deploy the app Reference

- + \ No newline at end of file diff --git a/docs/tags/gitlab/index.html b/docs/tags/gitlab/index.html index 275f8343..f793dae1 100644 --- a/docs/tags/gitlab/index.html +++ b/docs/tags/gitlab/index.html @@ -6,13 +6,13 @@ One doc tagged with "gitlab" | Cloud & DevOps - +

One doc tagged with "gitlab"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/husky/index.html b/docs/tags/husky/index.html index 8d243a2f..c34d8210 100644 --- a/docs/tags/husky/index.html +++ b/docs/tags/husky/index.html @@ -6,13 +6,13 @@ One doc tagged with "husky" | Cloud & DevOps - +

One doc tagged with "husky"

View All Tags

Husky

1. Sample Husky Implementation reference

- + \ No newline at end of file diff --git a/docs/tags/index.html b/docs/tags/index.html index 7048382d..4223e76e 100644 --- a/docs/tags/index.html +++ b/docs/tags/index.html @@ -6,13 +6,13 @@ Tags | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/tags/java/index.html b/docs/tags/java/index.html index 884a02bc..fe37f1b7 100644 --- a/docs/tags/java/index.html +++ b/docs/tags/java/index.html @@ -6,13 +6,13 @@ 3 docs tagged with "java" | Cloud & DevOps - +

3 docs tagged with "java"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/javascript/index.html b/docs/tags/javascript/index.html index 5984a427..b12c5986 100644 --- a/docs/tags/javascript/index.html +++ b/docs/tags/javascript/index.html @@ -6,13 +6,13 @@ 3 docs tagged with "javascript" | Cloud & DevOps - +

3 docs tagged with "javascript"

View All Tags

Angular

Known to compile/build Errors

- + \ No newline at end of file diff --git a/docs/tags/jenkins/index.html b/docs/tags/jenkins/index.html index 2cf6ebe0..b0453e0b 100644 --- a/docs/tags/jenkins/index.html +++ b/docs/tags/jenkins/index.html @@ -6,13 +6,13 @@ One doc tagged with "jenkins" | Cloud & DevOps - +

One doc tagged with "jenkins"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/js/index.html b/docs/tags/js/index.html index 733b0a65..27a89c73 100644 --- a/docs/tags/js/index.html +++ b/docs/tags/js/index.html @@ -6,13 +6,13 @@ One doc tagged with "js" | Cloud & DevOps - +

One doc tagged with "js"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/kubernetes/index.html b/docs/tags/kubernetes/index.html index 64fcc98b..a96e6022 100644 --- a/docs/tags/kubernetes/index.html +++ b/docs/tags/kubernetes/index.html @@ -6,13 +6,13 @@ 2 docs tagged with "kubernetes" | Cloud & DevOps - +

2 docs tagged with "kubernetes"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/nginx/index.html b/docs/tags/nginx/index.html index 491ce7e2..7df78d4d 100644 --- a/docs/tags/nginx/index.html +++ b/docs/tags/nginx/index.html @@ -6,13 +6,13 @@ 2 docs tagged with "nginx" | Cloud & DevOps - +

2 docs tagged with "nginx"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/node/index.html b/docs/tags/node/index.html index 15ee52bc..345e4f53 100644 --- a/docs/tags/node/index.html +++ b/docs/tags/node/index.html @@ -6,13 +6,13 @@ One doc tagged with "node" | Cloud & DevOps - +

One doc tagged with "node"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/nodejs/index.html b/docs/tags/nodejs/index.html index 98d4ba44..940b06e5 100644 --- a/docs/tags/nodejs/index.html +++ b/docs/tags/nodejs/index.html @@ -6,13 +6,13 @@ 3 docs tagged with "nodejs" | Cloud & DevOps - +

3 docs tagged with "nodejs"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/package-manager/index.html b/docs/tags/package-manager/index.html index de44f0c6..baed4b6b 100644 --- a/docs/tags/package-manager/index.html +++ b/docs/tags/package-manager/index.html @@ -6,13 +6,13 @@ One doc tagged with "package manager" | Cloud & DevOps - +

One doc tagged with "package manager"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/pipeline/index.html b/docs/tags/pipeline/index.html index c2856793..e6da679c 100644 --- a/docs/tags/pipeline/index.html +++ b/docs/tags/pipeline/index.html @@ -6,13 +6,13 @@ One doc tagged with "pipeline" | Cloud & DevOps - +

One doc tagged with "pipeline"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/podman/index.html b/docs/tags/podman/index.html index b2f238af..05a02e4d 100644 --- a/docs/tags/podman/index.html +++ b/docs/tags/podman/index.html @@ -6,13 +6,13 @@ One doc tagged with "podman" | Cloud & DevOps - +

One doc tagged with "podman"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/prometheus/index.html b/docs/tags/prometheus/index.html index ade046ef..e4b4410a 100644 --- a/docs/tags/prometheus/index.html +++ b/docs/tags/prometheus/index.html @@ -6,13 +6,13 @@ One doc tagged with "prometheus" | Cloud & DevOps - +

One doc tagged with "prometheus"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/python/index.html b/docs/tags/python/index.html index f76c2437..128d3941 100644 --- a/docs/tags/python/index.html +++ b/docs/tags/python/index.html @@ -6,13 +6,13 @@ One doc tagged with "python" | Cloud & DevOps - +

One doc tagged with "python"

View All Tags

Python

Deeplearning Setup in Mac

- + \ No newline at end of file diff --git a/docs/tags/react/index.html b/docs/tags/react/index.html index ba4ab973..22061403 100644 --- a/docs/tags/react/index.html +++ b/docs/tags/react/index.html @@ -6,13 +6,13 @@ 2 docs tagged with "react" | Cloud & DevOps - +

2 docs tagged with "react"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/reactjs/index.html b/docs/tags/reactjs/index.html index 9e478272..c794b937 100644 --- a/docs/tags/reactjs/index.html +++ b/docs/tags/reactjs/index.html @@ -6,13 +6,13 @@ One doc tagged with "reactjs" | Cloud & DevOps - +

One doc tagged with "reactjs"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/rust/index.html b/docs/tags/rust/index.html index 0190f093..86da3e89 100644 --- a/docs/tags/rust/index.html +++ b/docs/tags/rust/index.html @@ -6,13 +6,13 @@ 3 docs tagged with "rust" | Cloud & DevOps - +

3 docs tagged with "rust"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/sonarqube/index.html b/docs/tags/sonarqube/index.html index 3a9cfb4b..fa3704f2 100644 --- a/docs/tags/sonarqube/index.html +++ b/docs/tags/sonarqube/index.html @@ -6,13 +6,13 @@ One doc tagged with "sonarqube" | Cloud & DevOps - +

One doc tagged with "sonarqube"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/spring-boot/index.html b/docs/tags/spring-boot/index.html index 7f47f9e3..f5e77055 100644 --- a/docs/tags/spring-boot/index.html +++ b/docs/tags/spring-boot/index.html @@ -6,13 +6,13 @@ 2 docs tagged with "spring-boot" | Cloud & DevOps - +

2 docs tagged with "spring-boot"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/spring/index.html b/docs/tags/spring/index.html index 14591375..71d71ca1 100644 --- a/docs/tags/spring/index.html +++ b/docs/tags/spring/index.html @@ -6,13 +6,13 @@ One doc tagged with "spring" | Cloud & DevOps - +

One doc tagged with "spring"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/ssh/index.html b/docs/tags/ssh/index.html index a9c4858a..a76bc73d 100644 --- a/docs/tags/ssh/index.html +++ b/docs/tags/ssh/index.html @@ -6,13 +6,13 @@ One doc tagged with "ssh" | Cloud & DevOps - +

One doc tagged with "ssh"

View All Tags

SSH

Create SSH Key

- + \ No newline at end of file diff --git a/docs/tags/terraform/index.html b/docs/tags/terraform/index.html index dbe0cda2..e1d16ff2 100644 --- a/docs/tags/terraform/index.html +++ b/docs/tags/terraform/index.html @@ -6,13 +6,13 @@ One doc tagged with "terraform" | Cloud & DevOps - +

One doc tagged with "terraform"

View All Tags

Terraform

Workspace based terraform automation project setup for multi-cloud.

- + \ No newline at end of file diff --git a/docs/tags/ubuntu/index.html b/docs/tags/ubuntu/index.html index 828f97ca..404dd0ca 100644 --- a/docs/tags/ubuntu/index.html +++ b/docs/tags/ubuntu/index.html @@ -6,13 +6,13 @@ One doc tagged with "ubuntu" | Cloud & DevOps - +

One doc tagged with "ubuntu"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/windows/index.html b/docs/tags/windows/index.html index 875f8282..35570a1d 100644 --- a/docs/tags/windows/index.html +++ b/docs/tags/windows/index.html @@ -6,13 +6,13 @@ One doc tagged with "windows" | Cloud & DevOps - +

One doc tagged with "windows"

View All Tags
- + \ No newline at end of file diff --git a/docs/tools/ansible/index.html b/docs/tools/ansible/index.html index 4e14cafb..d034906d 100644 --- a/docs/tools/ansible/index.html +++ b/docs/tools/ansible/index.html @@ -6,13 +6,13 @@ Ansible | Cloud & DevOps - +

Ansible

Setup Ansible Controle panel​

Install Ansible in Alpine​

apk add --update ansible sshpass python3 py3-pip && ln -sf python3 /usr/bin/python
pip install pywinrm # This is required If target is Windows OS
ansible-galaxy collection install community.general # Install if required
ansible-galaxy collection install ansible.posix # Install if required

Install Ansible in Ubutu​

sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible -y

Establish Connecton​

Target Windows (winrm)​

  1. Check whether WinRM service is running. winrm quickconfig
  2. Create HTTPS listener
Run the bleow Powershell commands in Administrator mode
  # List listeners
WinRM e winrm/config/listener

# Generate self signed certificate
New-SelfSignedCertificate -DnsName "<YOUR_DNS_NAME>" -CertStoreLocation Cert:\LocalMachine\My

# Create HTTPS Listeners
winrm create winrm/config/Listener?Address=*+Transport=HTTPS '@{Hostname="<YOUR_DNS_NAME>"; CertificateThumbprint="<COPIED_CERTIFICATE_THUMBPRINT>"}'

# Delete Listeners
winrm delete winrm/config/Listener?Address=*+Transport=HTTPS
  1. Add firewall exception
Open the port 5985 for HTTP and 5986 for HTTPS (recomended) in the target Windows OS firewall and Cloud provider's Security Group / Networking.
  1. Validate HTTPS listener WinRM e winrm/config/listener

  2. Verify you can connect to the machine via HTTPS

Run the bleow Powershell commands in Administrator mode
$hostName="<DNS_NAME>" # example: "mission.westus.cloudapp.azure.com"
$winrmPort = "5986"

# Get the credentials of the machine
$cred = Get-Credential

# Connect to the machine
$soptions = New-PSSessionOption -SkipCACheck
Enter-PSSession -ComputerName $hostName -Port $winrmPort -Credential $cred -SessionOption $soptions -UseSSL
To Allow Unencrypted Password, run the following command (Not Recomended)
Set-Item -Path WSMan:\localhost\Service\Auth\Basic -Value $true
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
Reference

Target Ubuntu (SSH)​

  1. Install the OpenSSH Server in target OS

  2. Run the OpenSSH Server service in the target OS

  3. connect using ssh username@hostname. Ex. ssh admin@192.168.0.1 (or) ssh -i key.pem username@hostname

TODO:

Sample Inventory file​

Target - Windows OS​

[GCP]
43.81.83.173

[GCP:vars]
ansible_connection=winrm
ansible_user=ansibleadmin
ansible_password=admin@123
ansible_port=5986
ansible_winrm_server_cert_validation=ignore

Target - Linux/Other OS​

TODO:

Ansible Vault Ref​

TODO:

Ansible Key Features​

Lookup​

INI Lookup Example​

[production]
# My production information
user=robert
pass=somerandompassword

[integration]
# My integration information
user=gertrude
pass=anotherpassword

We can use the ini plugin to lookup user configuration:

- debug: msg="User in integration is {{ lookup('ini', 'user section=integration file=users.ini') }}"
- debug: msg="User in production is {{ lookup('ini', 'user section=production file=users.ini') }}"

Java properties Lookup Example​

user.name=robert
user.pass=somerandompassword

You can retrieve the user.name field with the following lookup:

- debug: msg="user.name is {{ lookup('ini', 'user.name type=properties file=user.properties') }}"

Sample Playbooks​

Windows: Angular Application Deployed in NGINX Web Server​

(Controle plane is Ubntu -> Target OS is Windows)

Tasks​

  1. Install the NGINX Web Server
  2. Configure the NGINX Web Server by edit/copy the nginx.conf file
  3. Run the NGINX as windows service
  4. Zip the Angular distribution folder
  5. Copy to the target machine
  6. Remove existing deployment
  7. Unzip the file

Playbook file​

Deploy the static web application (html/css) in NGINX Web Server

playbook.yml
- hosts: {{HOSTS}}
remote_user: root
gather_facts: False

pre_tasks:
- debug: msg="Ansible is working!"
- name: ping
win_ping:

tasks:
# Install NGINX WebServer

- name: Install NGINX
win_chocolatey:
name: nginx
version: '1.12.1'
state: present

- name: Install nssm
win_chocolatey:
name: nssm
state: present

- name: Copy NGINX conf file
win_template:
src: nginx.conf.tpl
dest: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\conf\nginx.conf

- name: Copy Cert file 1
win_template:
src: ../cert.pem
dest: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\conf\cert.pem

- name: Copy Cert file 2
win_template:
src: ../cert.key
dest: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\conf\cert.key

- name: Create Log Folder
win_file:
path: C:\nginx
state: directory

- name: Install nginx as service
win_nssm:
name: nginx
application: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\nginx.exe
app_parameters_free_form: -c C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\conf\nginx.conf -p C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1
stdout_file: C:\nginx\nginx_out.txt
stderr_file: C:\nginx\nginx_error.txt
start_mode: auto

- name: Start Nginx
win_service:
name: nginx
start_mode: auto
state: started

# https://docs.ansible.com/ansible/2.5/modules/win_firewall_rule_module.html
- name: Firewall rules
win_firewall_rule:
name: "{{ item.name }}"
localport: "{{ item.port }}"
action: allow
direction: in
protocol: tcp
state: present
enabled: yes
with_items:
- {name: HTTP, port: 80}
- {name: HTTPS, port: 443}
- {name: WINRM-HTTPS, port: 5986}

# Deploy the Angular Application

- name: Archive the Angular Application
archive:
path: /opt/atlassian/pipelines/agent/build/dist/Mission-web
dest: ./app.zip
format: zip
delegate_to: localhost
become: false

- name: Copy zip File to target
win_copy:
src: ./app.zip
dest: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\

- name: Unarchive
win_unzip:
src: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\app.zip
dest: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\
delete_archive: yes

- name: Remove existing ui deployment
win_file:
path: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\html
state: absent

- name: Create Folder
win_file:
path: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\html
state: directory

- name: Move Content
win_copy:
remote_src: yes
src: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\Mission-web\
dest: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\html\

- name: Remove directory structure
win_file:
path: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\Mission-web
state: absent

Windeows: Spring Boot Application Deploy as Windows Service In Winsows​

Tasks​

  1. Install the NGINX Web Server

Playbook file​

- hosts: {{HOSTS}}
remote_user: root
gather_facts: False

pre_tasks:
- debug: msg="Ansible is working in control machine"
- name: Client machine connectivity check by Ping
win_ping:

tasks:

# PROXY Server Deployment

- name: Install NGINX
win_chocolatey:
name: nginx
version: '1.12.1'
state: present

- name: Install nssm
win_chocolatey:
name: nssm
state: present

- name: Copy NGINX conf file
win_template:
src: nginx.conf.tpl
dest: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\conf\nginx.conf

# Certificate (.pem & .key ) files copy to target machine

- name: Copy Cert file 1
win_template:
src: ../cert.pem
dest: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\conf\cert.pem

- name: Copy Cert file 2
win_template:
src: ../cert.key
dest: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\conf\cert.key

- name: Create Log Folder
win_file:
path: C:\nginx
state: directory

- name: Install nginx as service
win_nssm:
name: nginx
application: C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\nginx.exe
app_parameters_free_form: -c C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1\conf\nginx.conf -p C:\ProgramData\chocolatey\lib\nginx\tools\nginx-1.12.1
stdout_file: C:\nginx\nginx_out.txt
stderr_file: C:\nginx\nginx_error.txt
start_mode: auto

- name: Start Nginx
win_service:
name: nginx
start_mode: auto
state: started

# https://docs.ansible.com/ansible/2.5/modules/win_firewall_rule_module.html
- name: Firewall rules
win_firewall_rule:
name: "{{ item.name }}"
localport: "{{ item.port }}"
action: allow
direction: in
protocol: tcp
state: present
enabled: yes
with_items:
- {name: HTTP, port: 80}
- {name: HTTPS, port: 443}
- {name: WINRM-HTTPS, port: 5986}

# REST API Deployment

- name: Remove Spring Boot service
win_service:
name: mission-api
state: absent
ignore_errors: yes

- name: Create Application Folder
win_file:
path: C:\Mission\App
state: directory

- name: Copy API application
copy:
src: /opt/atlassian/pipelines/agent/build/target/mission-app-core-1.0-SNAPSHOT.jar
dest: C:\Mission\App\mission-app-core-1.0-SNAPSHOT.jar
directory_mode: yes

- name: Archive the Config
archive:
path: /opt/atlassian/pipelines/agent/build/src/main/resources/config
dest: ./config.zip
format: zip
delegate_to: localhost
become: false

- name: Copy zip File to target
win_copy:
src: ./config.zip
dest: C:\Mission\

- name: Remove existing Config
win_file:
path: C:\Mission\config
state: absent

- name: Unarchive
win_unzip:
src: C:\Mission\config.zip
dest: C:\Mission\
delete_archive: yes

# - name: Install Java
# win_chocolatey:
# name: jdk8
# state: present
# version: 8.0.191

# https://community.chocolatey.org/packages/openjdk8#ansible
- name: Install openjdk8
win_chocolatey:
name: openjdk8
version: '8.312.07'
source: https://community.chocolatey.org/api/v2/
state: present

- name: Set Java_home
win_environment:
state: present
name: JAVA_HOME
value: 'C:\Program Files\java\jdk1.8.0_191'
level: machine

- name: Add Java to path
win_path:
elements:
- 'C:\Program Files\java\jdk1.8.0_191\bin'

- name: Install Spring Boot app as Windows service (via nssm)
win_nssm:
name: mission-api
application: C:\Program Files\java\jdk1.8.0_191\bin\java.exe
app_parameters_free_form: "-jar C:/Mission/App/mission-app-core-1.0-SNAPSHOT.jar"
state: stopped

- name: Set the Application path for the Spring Boot app to the folder where the needed native libraries reside
raw: nssm set mission-api AppDirectory C:/Mission/

- name: Set SPRING_DATASOURCE_URL
win_environment:
state: present
name: SPRING_DATASOURCE_URL
value: 'jdbc:postgresql://{{dburl}}:{{dbport}}/{{dbname}}'
level: machine

- name: Set SPRING_DATASOURCE_USERNAME
win_environment:
state: present
name: SPRING_DATASOURCE_USERNAME
value: '{{dbusername}}'
level: machine

- name: Set SPRING_DATASOURCE_PASSWORD
win_environment:
state: present
name: SPRING_DATASOURCE_PASSWORD
value: '{{dbpassword}}'
level: machine

- name: Set SERVER_PORT
win_environment:
state: present
name: SERVER_PORT
value: '{{serverport}}'
level: machine

- name: Fire up Spring Boot app Windows service
win_service:
name: mission-api
state: restarted

###### Smoke test, if app has booted up correctly
# - name: Wait until our Spring Boot app is up & running
# win_uri:
# url: "https://{{SUBDOMAIN}}.mission.io/miosvc/actuator/health"
# method: GET
# register: result
# until: result.status_code is defined and result.status_code == 200
# retries: 5
# delay: 5

Debian: Spring Boot Application deploy​

Tasks​

Playbook file​

playbook.yml

- hosts: all
remote_user: amazeadmin
gather_facts: false
vars:
ansible_python_interpreter: /usr/bin/python3
become: true

tasks:
- name: Install Prerequisites
apt:
name: aptitude
update_cache: yes
state: latest
force_apt_get: yes

# Sudo Group Setup
- name: Make sure we have a 'wheel' group
group:
name: wheel
state: present

- name: Allow 'wheel' group to have passwordless sudo
lineinfile:
path: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
validate: '/usr/sbin/visudo -cf %s'

# User + Key Setup
- name: Create a new regular user with sudo privileges
user:
name: amazeadmin
state: present
groups: wheel
append: true
create_home: true
shell: /bin/bash

- name: Set authorized key for remote user
authorized_key:
user: amazeadmin
state: present
key: "{{ lookup('file', './amazeadmin.pub') }}"
# key: ./amazeadmin.pub

- name: Disable password authentication for root
lineinfile:
path: /etc/ssh/sshd_config
state: present
regexp: '^#?PermitRootLogin'
line: 'PermitRootLogin prohibit-password'

# Install Packages
- name: Update apt
apt: update_cache=yes

- name: Install required system packages
apt: name=ufw state=latest

# UFW Setup
- name: UFW - Allow SSH connections
ufw:
rule: allow
name: OpenSSH

- name: UFW - Deny all other incoming traffic by default
ufw:
state: enabled
policy: deny
direction: incoming

- name: Install latest version of "openjdk-11-jdk" ignoring "install-recommends"
apt:
name: openjdk-11-jdk
state: latest
install_recommends: no

Ansible Galaxy (ansible-galaxy)​

- + \ No newline at end of file diff --git a/docs/tools/bash/index.html b/docs/tools/bash/index.html index 1338ee77..680fca53 100644 --- a/docs/tools/bash/index.html +++ b/docs/tools/bash/index.html @@ -6,13 +6,13 @@ Bash | Cloud & DevOps - +

Bash

Docs​

man bash
info bash

Bash Script file​

Common usage
#!/bin/bash

(or)

#!/usr/bin/env bash

Execute​

chmod +x script.sh
./script.sh

Variables​

Declare variable​

variableName="value"
export variableName2="value2"
declare -x variableName3="value3"

Access the variable​

echo $variableName
echo $variableName2
echo $variableName3

Grouping​

() -> scope clear
{} -> scope extend

Bash Startup​

.bash_profile # read when bash is invoked as login shell
.bashrc # executed when new shell is started

Typeset​

typeset -i x # x must be an integer

# Types
-i -> Integer

Declare​

declare -a ArrayVariable

# Options
-l -> To lowercase
-u -> To uppercase
-r -> Read only
-a -> To indexed array

While Loop​

while 
command list 1
do
command list
done
# loops while command list 1 succeeds


while
read a b
do
echo a is $a b is $b
done <data_file

For Loops​

for <var> in <list>
do
echo i is $i
done

tip

expression inside `` symbol will execute before the loop begin. Ex.

for num in `seq 1 5`
do
echo num is $num
done

Case Statement​

case expression in
pattern 1| pattern 3)
command list;;
pattern 2)
command list;;
esac

If Statement​

if 
command list
then
command list
else
command list
fi

Bash Commands​

time find / -name core
source script.sh
#(or)
. script.sh
alias ll="ls -l"
unalias ll
read a b <data_file
(or)
read a b c d
seq 1 5
find . -name '*.c'
grep txt # Find text in result
lsof # List all port and process names
sed # Find and replace
wc -l <filename> # get word/line count of the file
test # Evoluate the epxression. ex. test -f myfile (or) test $x -gt 10
# Alternatives of test is [[-gt, -lt]] or ((>, <))
strings
ps [-ly | -el]
head
tail


Tail​

tail -2 <filename>      # Get last 2 line of the file
tail -n2 -f <filename> # Watch/Monitor file changes

Sed​

/g in the pattern '/s/old/new/g is repleace all the old value with new value. Otherwise it will replce the first occarance of each line.

p -> Print
d -> delete
G -> Space between line. ex: `sed G f.txt` (or) `sed 'G;G' f.txt`
s -> substitute
g ->
f -> script file
e -> script
i -> extention
sed 's/old/new/'; 's/demo/prod/'
sed -id 's/old/new/g' file1.txt
sed -d 's/[xX]/Y/' -e 's/b.*n/blue/'
sed -f sedscript -n sed4 # sed scripts file as input
date | sed 's/J/j/'
sed '1,5p'

sed '/alpha/s/beta/gama/'
sed '/apple/,/orange/d'
sed '/important/!s/print/throw_away/'

File all files with multiple replacements​
find . -type f -name '*.txt' -exec sed -f sedfile {} +

(or)

find . -type f -name '*.txt' -exec sed -f sedfile {} \;

awk​


tip
  1. echo $? # Last process exit status

  2. file

  3. Add & end of the expression will run the bash in background.

- + \ No newline at end of file diff --git a/docs/tools/container/index.html b/docs/tools/container/index.html index 35792ded..8a77dd5d 100644 --- a/docs/tools/container/index.html +++ b/docs/tools/container/index.html @@ -6,13 +6,13 @@ Container | Cloud & DevOps - +

Container

Docker​

Podman​

Commands​

HEALTHCHECK CMD curl --fail http://localhost:5000/healthz || exit

Dockerfile Samples​

Dotnet Smaller and Secure Container Image​


FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS publish
WORKDIR /src
COPY ContainerSample.csproj ./

RUN dotnet restore "./ContainerSample.csproj" --runtime alpine-x64
COPY . .
RUN dotnet publish "ContainerSample.csproj" -c Release -o /app/publish \
--no-restore \
--runtime alpine-x64 \
--self-contained true \
/p:PublishTrimmed=true \
/p:PublishSingleFile=true

FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-alpine AS final

RUN adduser --disabled-password \
--home /app \
--gecos '' dotnetuser && chown -R dotnetuser /app

# upgrade musl to remove potential vulnerability
RUN apk upgrade musl

USER dotnetuser
WORKDIR /app
EXPOSE 5000
COPY --from=publish /app/publish .

ENTRYPOINT ["./ContainerSample", "--urls", "http://localhost:5000"]

Angular Container image​

FROM alpine:latest AS build

RUN apk update \\
&& apk add nodejs --no-cache && node -v \\
&& apk add npm --no-cache && npm -v

WORKDIR /opt/ng
COPY package.json package-lock.json ./
ENV NODE_OPTIONS=--max_old_space_size=2048
RUN npm install

ENV PATH="./node_modules/.bin:$PATH"

COPY . ./
RUN ng build --prod

FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/nginx.conf
COPY --from=build /opt/ng/dist /usr/share/nginx/html
# RUN addgroup -S <group-name> && adduser -S <user-name> -G <group-name>
# USER <user-name>:<group-name>
RUN addgroup -S svc-group && adduser -S svc-user -G svc-group
USER svc-user:svc-group
EXPOSE 80
ENTRYPOINT ["nginx", "-g", "daemon off;"]

Spring Boot Container Image​

FROM maven:3.6.1 AS build
WORKDIR /opt/workspace
# Copy All source code to workspace
COPY . ./
RUN mvn install

FROM openjdk:8-jdk-alpine
RUN addgroup -S svc-group && adduser -S svc-user -G svc-group
USER svc-user:svc-group
COPY --from=build /opt/workspace/target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","/app.jar"]

Rust Container Image​

FROM rust:latest as build
WORKDIR /ws
COPY . ./
RUN rustup default nightly && \
rustup target add x86_64-unknown-linux-musl && \
rustc --version && \
cargo --version && \
cargo build --release --target x86_64-unknown-linux-musl

FROM alpine:latest
COPY --from=build /ws/target/x86_64-unknown-linux-musl/release/<app-name> ./
COPY --from=build /ws/templates ./templates
EXPOSE 8000
CMD ["./<app-name>"]
- + \ No newline at end of file diff --git a/docs/tools/git/index.html b/docs/tools/git/index.html index a16dae74..7ae4b3b2 100644 --- a/docs/tools/git/index.html +++ b/docs/tools/git/index.html @@ -6,13 +6,13 @@ Git | Cloud & DevOps - +
-

Git

Rollback last commit in a local git repository​

Revert the last commit in a local git repository
git reset HEAD~1

Revert the last commit from GitHub remote repository​

Revert the last commit from remote repository
git checkout <branch-name>

# Revert 1 commit from remote
git push --force origin HEAD~1:<branch-name>

Set local repo user name and email

git config user.name "Your Name Here"
git config user.email [email protected]

For (global) default email (which is configured in your ~/.gitconfig):

git config --global user.name "Your Name Here"
git config --global user.email [email protected]
- +

Git

Rollback last commit in a local git repository​

Revert the last commit in a local git repository
git reset HEAD~1

Revert the last commit from GitHub remote repository​

Revert the last commit from remote repository
git checkout <branch-name>

# Revert 1 commit from remote
git push --force origin HEAD~1:<branch-name>

Set local repo user name and email

git config user.name "Your Name Here"
git config user.email [email protected]

For (global) default email (which is configured in your ~/.gitconfig):

git config --global user.name "Your Name Here"
git config --global user.email [email protected]

Ask password

git config credential.helper store
+ \ No newline at end of file diff --git a/docs/tools/helm/index.html b/docs/tools/helm/index.html index 659e0d28..bd75a73b 100644 --- a/docs/tools/helm/index.html +++ b/docs/tools/helm/index.html @@ -6,13 +6,13 @@ Helm Charts | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/tools/husky/index.html b/docs/tools/husky/index.html index 9c15110f..32edce2f 100644 --- a/docs/tools/husky/index.html +++ b/docs/tools/husky/index.html @@ -6,13 +6,13 @@ Husky | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/tools/kubernetes/index.html b/docs/tools/kubernetes/index.html index fc21e722..5e71f7a8 100644 --- a/docs/tools/kubernetes/index.html +++ b/docs/tools/kubernetes/index.html @@ -6,13 +6,13 @@ Kubernetes | Cloud & DevOps - +
- + \ No newline at end of file diff --git a/docs/tools/nginx/index.html b/docs/tools/nginx/index.html index 86f532a9..4d9c3566 100644 --- a/docs/tools/nginx/index.html +++ b/docs/tools/nginx/index.html @@ -6,13 +6,13 @@ NGINX | Cloud & DevOps - +

NGINX

NGINX Instalation​

Windows​

Ubuntu​

HTTPS​

tip

Please ensure that 443 port is enabled in VM's firewall and cloud provider's security group / Networking.

NGINX Commands​

nginx -s stop #fast shutdown
nginx -s quit #graceful shutdown
nginx -s reload #changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes
nginx -s reopen #re-opening log files

HTTPS Web Server Sample Config​

nginx.conf
worker_processes  1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

# HTTPS server
#
server {
listen 443 ssl;
server_name localhost {{SUBDOMAIN}}.mission.io;

ssl_certificate cert.pem;
ssl_certificate_key cert.key;

ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;

ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

location / {
root html;
index index.html index.htm;
}
}

# Http to Https URL redirection
server {
listen 80;
server_name {{SUBDOMAIN}}.mission.io;
return 301 https://{{SUBDOMAIN}}.mission.io$request_uri;
}
}
tip

Http to Https redirection

server {
listen 80;
server_name {{SUBDOMAIN}}.mission.io;
return 301 https://{{SUBDOMAIN}}.mission.io$request_uri;
}

HTTPS Proxy Server Sample Configuration​

nginx.conf
worker_processes  1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

client_max_body_size 1000M;
#gzip on;

# HTTPS server
#
server {
listen 443 ssl;
server_name localhost {{SUBDOMAIN}}.mission.io;

ssl_certificate cert.pem;
ssl_certificate_key cert.key;

ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;

ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

client_max_body_size 1000M;

location / {
root html;
index index.html index.htm;
}

location /mission-api/ {
proxy_pass http://127.0.0.1:8081$request_uri;
client_max_body_size 1000M;
}
}

# Http to Https URL redirection
server {
listen 80;
server_name {{SUBDOMAIN}}.mission.io;
return 301 https://{{SUBDOMAIN}}.mission.io$request_uri;
}
}

Sample nginx.config files​

TODO:

- + \ No newline at end of file diff --git a/docs/tools/prometheus/index.html b/docs/tools/prometheus/index.html index 80ac809a..6ef0ea7d 100644 --- a/docs/tools/prometheus/index.html +++ b/docs/tools/prometheus/index.html @@ -6,13 +6,13 @@ Prometheus | Cloud & DevOps - + - + \ No newline at end of file diff --git a/docs/tools/sonarqube/index.html b/docs/tools/sonarqube/index.html index 7c1bc292..06a3d045 100644 --- a/docs/tools/sonarqube/index.html +++ b/docs/tools/sonarqube/index.html @@ -6,13 +6,13 @@ Sonarqube | Cloud & DevOps - +

Sonarqube

Integrate with Github Actions​

name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: windows-latest
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.11
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v1
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner
- name: Install SonarCloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: powershell
run: |
New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"natarajanmca11_dotnet-api" /o:"natarajanmca11" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
<insert_your_build_command>
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
- + \ No newline at end of file diff --git a/docs/tools/ssh/index.html b/docs/tools/ssh/index.html index 8bdeb6ae..43aea999 100644 --- a/docs/tools/ssh/index.html +++ b/docs/tools/ssh/index.html @@ -6,13 +6,13 @@ SSH | Cloud & DevOps - +

SSH

Create SSH Key​

  1. Youtube SSH Login in Ubuntu
  2. Github SSH reference
  3. SSH Based Auth
  4. GCP Ref
Generate SSH key

ssh-keygen -t rsa -f ~/.ssh/<ssh-file-name> -C <UserName> -b 2048

SSH Login with Key​

Debian OS​

SSH Login

ssh -i PATH_TO_PRIVATE_KEY USERNAME@EXTERNAL_IP

Known Issues​

Issue 1: UNPROTECTED PRIVATE KEY FILE​

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for 'sshuser' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "sshuser": bad permissions
sshuser@135.97.89.129: Permission denied (publickey).

Solution for Windows SSH Client​

Private key file should not have more than one user access. Removed other users from the property. Ref

  1. Right click the Key file first1.pem on explorer and Go to Properties > Security > Advanced > Disable Inheritance
  2. Select "Convert inherited permissions into explicit permissions on this object"
  3. Then delete everything there ( Including Administrator, User, User Groups ) and Click Add button.
  4. Now select select a principal > Advanced > Find Now > [ Your User object ] > OK
  5. Now you can tick "Full Control" then press OK

Now your key file is not accessible by others.

Issue 2:​

- + \ No newline at end of file diff --git a/docs/tools/terraform/index.html b/docs/tools/terraform/index.html index 599568a3..0a1c703d 100644 --- a/docs/tools/terraform/index.html +++ b/docs/tools/terraform/index.html @@ -6,13 +6,13 @@ Terraform | Cloud & DevOps - +

Terraform

Workspace based terraform automation project setup for multi-cloud.

Cloud Module Reference​

  1. Azure
  2. AWS
  3. GCP
  4. Rover - Terraform visualizer

Folder structure of terrafrom project​

TERRAFORM
β”‚ .gitignore
β”‚ .terraform.lock.hcl
β”‚ main.tf # Main terraform file
β”‚ outputs.tf # Output variables
β”‚ provider.tf # All providers with version number declaration
β”‚ terrafrom.tfvars # Terraform's default variables definitions.
β”‚ variables.tf # Terraform variables declarations
β”‚
β”œβ”€β”€β”€.terraform
β”‚ β”‚ environment
β”‚ β”‚
β”‚ β”œβ”€β”€β”€modules
β”‚ β”‚ modules.json
β”‚ β”‚
β”‚ └───providers
β”‚ └───registry.terraform.io
β”‚
└───terraform.tfstate.d
β”œβ”€β”€β”€Test
β”œβ”€β”€β”€Uat
└───Prod

Sample files shared below

Note: terrafrom.tfvars is default variable definition file. Custom name is acceptable. but need to spacify the file name in every execution liek terraform apply var-file=test.env.tfvars

Init the terraform project​


terraform init (or) terraform init --upgrade

Terrafrom workspace​

# Create workspace
terrafrom workspace new Test
terrafrom workspace new Uat
terrafrom workspace new Prod

# Select/Change workspace
terraform workspace select Test

# List all workspace
terraform workspace list

# Deelte workspace
terraform workspace delete Test

Plan​

terraform plan  # terraform will take terraform.tfvars as default variable file.
terraform plan var-file=test.evn.tfvars

Apply​


terraform apply -y var-file=test.env.tfvars

Azure​

Authenticaton setup​

export ARM_SUBSCRIPTION_ID="<azure_subscription_id>"
export ARM_TENANT_ID="<azure_subscription_tenant_id>"
export ARM_CLIENT_ID="<service_principal_appid>"
export ARM_CLIENT_SECRET="<service_principal_password>"

Note: When authenticating as a Service Principal using a Client Secret, client_secret fields need to be set. This can also be sourced from the ARM_CLIENT_SECRET Environment Variable.

(or)

provider "azurerm" {
subscription_id = var.azure.subscription_id
# client_id = var.azure.client_id
# client_secret = var.azure.client_secret
tenant_id = var.azure.tenant_id
features {}
}

Secure State file in Azure Storeage​

terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=2.46.0"
}
}
backend "azurerm" {
resource_group_name = "tfstate"
storage_account_name = "<storage_account_name>"
container_name = "tfstate"
key = "terraform.tfstate"
}

}

AWS​

Authenticaton Setup​

export AWS_ACCESS_KEY_ID="anaccesskey"
export AWS_SECRET_ACCESS_KEY="asecretkey"
export AWS_DEFAULT_REGION="us-west-2"
terraform plan

Secure state file in AWS S3 Bucket​

terraform {
backend "s3" {
bucket = "mybucket"
key = "path/to/my/key"
region = "us-east-1"
}
}

GCP​

Authenticaton setup​

Secure state file in GCS (Google Cloud Storage)​

terraform {
backend "gcs" {
bucket = "tf-state-prod"
prefix = "terraform/state"
}
}

Sample terraform scripts​

Multi cloud terrafrom project

provider.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.2"
}
azurerm = {
source = "hashicorp/azurerm"
version = "2.98.0"
}
google = {
version = "~> 3.8"
}
random = "~> 2.2"
docker = "~> 2.7"
}
backend "azurerm" {
resource_group_name = "tfstate"
storage_account_name = "<storage_account_name>"
container_name = "tfstate"
key = "terraform.tfstate"
}
}

provider "aws" {
profile = var.aws.profile
region = var.aws.region
access_key = var.aws.access_key
secret_key = var.aws.secret_key
}

provider "azurerm" {
subscription_id = var.azure.subscription_id
# client_id = var.azure.client_id
# client_secret = var.azure.client_secret
tenant_id = var.azure.tenant_id
features {}
}

provider "google" {
credentials = file("account.json")
project = var.gcp.project_id
region = var.gcp.region
}

provider "docker" {
}
terraform.tfvars

aws = {
profile = "default" # ENV = AWS_PROFILE
region = "us-west-2" # ENV = AWS_REGION
access_key = "xxxxxxxxxxxxxxxxxxx" # ENV = AWS_ACCESS_KEY_ID
secret_key = "xxxxxxxxxxxxxxxxxxx" # ENV= AWS_SECRET_ACCESS_KEY
}
azure = {
subscription_id = "xxxx-xxxxx-xxxxx-xxxxx-xxxx-xxxx" # ENV = ARM_SUBSCRIPTION_ID
# client_id = "xxxx-xxxxx-xxxxx-xxxxx-xxxx-xxxx" # ENV = ARM_CLIENT_ID
# client_secret = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" # ENV= ARM_CLIENT_SECRET
tenant_id = "xxxx-xxxxx-xxxxx-xxxxx-xxxx-xxxx" # ENV = ARM_TENANT_ID
location = "centralus"
}

gcp = {
project_id = "<project_id>"
region = "us-east1"
}


variables.tf
variable "aws" {
type = object({
profile = string
region = string
access_key = string
secret_key = string
})
}

variable "azure" {
type = object({
subscription_id = string
# client_id = string
# client_secret = string
tenant_id = string
location = string
})
}

variable "gcp" {
type = object({
project_id = string
region = string
})
}
output.tf
output "addresses" {
value = {
# aws = module.aws.network_address
# azure = module.azure.network_address
# gcp = module.gcp.network_address
# loadbalancer = module.loadbalancer.network_address
}
}

Landing Zone Creation​

Best Practices Reference
- + \ No newline at end of file diff --git a/index.html b/index.html index a839a3bd..b55df09d 100644 --- a/index.html +++ b/index.html @@ -6,13 +6,13 @@ Hello from Cloud & DevOps | Cloud & DevOps - +

Cloud & DevOps

Reference Guide

Learn Quickly

Learn Quickly

Easy to Use

Easy to Use

Focus on What Matters

Focus on What Matters

- + \ No newline at end of file diff --git a/natarajan-ganapathi/index.html b/natarajan-ganapathi/index.html index c4e47d55..52f98a27 100644 --- a/natarajan-ganapathi/index.html +++ b/natarajan-ganapathi/index.html @@ -6,13 +6,13 @@ Natarajan Ganapathi | Cloud & DevOps - +

Name: Natarajan Ganapathi

- + \ No newline at end of file