Skip to content

Commit 038971c

Browse files
Added Sidebar as required
1 parent 6158dfc commit 038971c

File tree

7 files changed

+155
-102
lines changed

7 files changed

+155
-102
lines changed

docs/.vuepress/config.js

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,42 @@ module.exports = {
66
displayAllHeaders: true,
77
nav: [
88
{ text: 'Home', link: '/' },
9-
{ text: 'Azure', link: '/azure/', items: [
10-
{text: 'DevOps', link: 'some'}
9+
{ text: 'Azure', link: '/', items: [
10+
{text: 'Azure', link: '/azure'}
1111
] },
12-
{ text: 'DevOps', link: '/devops/' },
12+
{
13+
text: 'JavaScript',
14+
items: [
15+
{text: 'Performance Testing with K6', link: '/javascript/k6.md'}
16+
]
17+
},
18+
{ text: 'DevOps', link: '/devops',
19+
items: [
20+
{text: 'Jenkins: Getting Started', link: '/devops/jenkins-getting-started.md'}
21+
]
22+
},
1323
{ text: 'php', link: '/php/' },
1424
{ text: 'LinkedIn', link: 'https://www.linkedin.com/in/codestellar/' }
15-
],
25+
],
1626
sidebar: [
1727
{
18-
title: 'Azure', // required
19-
path: '/azure/', // optional, link of the title, which should be an absolute path and must exist
20-
collapsable: false, // optional, defaults to true
21-
sidebarDepth: 1, // optional, defaults to 1
22-
children: [
23-
'/'
24-
]
25-
},
26-
{
27-
title: 'AWS', // required
28-
path: '/aws/', // optional, link of the title, which should be an absolute path and must exist
28+
title: 'DevOps', // required
29+
path: '/devops/', // optional, link of the title, which should be an absolute path and must exist
2930
collapsable: false, // optional, defaults to true
3031
sidebarDepth: 1, // optional, defaults to 1
3132
children: [
32-
'/'
33+
'/devops/jenkins-getting-started'
3334
]
3435
},
3536
{
36-
title: '.Net Core', // required
37-
path: '/netcore/', // optional, link of the title, which should be an absolute path and must exist
37+
title: 'JavaScript', // required
38+
path: '/javascript/', // optional, link of the title, which should be an absolute path and must exist
3839
collapsable: false, // optional, defaults to true
3940
sidebarDepth: 1, // optional, defaults to 1
4041
children: [
41-
'/'
42+
'/javascript/k6'
4243
]
43-
}
44+
}
4445
]
4546
},
4647
// configureWebpack: {

docs/.vuepress/public/js/petstore.js

Whitespace-only changes.

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ features:
1414
footer: MIT Licensed | Copyright © 2020-present Gaurav Madaan
1515
---
1616

17-
Hello and Welcome to my website. Codestellar! On this portal, I am committed to share whatever I learn or have learnt. Since, in my daily life, I work on different technologies and business problems, I did not want to focus on a particular topic for this website, instead, I am going to share what problem I was facing and what I learnt and how I learnt that. Simple! Let's get started.
17+
# Welcome
1818

19-
[[toc]]
19+
Hello and Welcome to my website. Codestellar! On this portal, I am committed to share whatever I learn or have learnt. Since, in my daily life, I work on different technologies and business problems, I did not want to focus on a particular topic for this website, instead, I am going to share what problem I was facing and what I learnt and how I learnt that. Simple! Let's get started.

docs/devops/ReadMe.md

Lines changed: 11 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,16 @@
1+
---
2+
title: 'DevOps Home'
3+
---
14
# DevOps
5+
- [Setup continuous integration with Travis CI](/devops/setup-ci-with-travis-ci)
26

3-
## Jenkins: Getting Started
4-
5-
Recently, I installed Jenkins on my ubuntu server, I read the documentation [here](https://www.jenkins.io/doc/book/installing/docker/) and here are the steps I followed:
6-
7-
- Installed Docker
8-
- Create a Docker Network
9-
````shell
10-
docker network create jenkins
11-
````
12-
13-
- To confirm that a network has been created, run:
14-
````shell
15-
docker network list
16-
````
17-
18-
- In order to be able to run docker commands inside jenkins nodes, install docker:dind image as follows:
19-
````shell
20-
docker run --name jenkins-docker --rm --detach \
21-
--privileged --network jenkins --network-alias docker \
22-
--env DOCKER_TLS_CERTDIR=/certs \
23-
--volume jenkins-docker-certs:/certs/client \
24-
--volume jenkins-data:/var/jenkins_home \
25-
--publish 2376:2376 docker:dind
26-
````
27-
28-
- Customise official Jenkins Docker image, by executing below two steps:
29-
- Create a docker file:
30-
````shell
31-
FROM jenkins/jenkins:2.263.3-lts-jdk11
32-
USER root
33-
RUN apt-get update && apt-get install -y apt-transport-https \
34-
ca-certificates curl gnupg2 \
35-
software-properties-common
36-
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
37-
RUN apt-key fingerprint 0EBFCD88
38-
RUN add-apt-repository \
39-
"deb [arch=amd64] https://download.docker.com/linux/debian \
40-
$(lsb_release -cs) stable"
41-
RUN apt-get update && apt-get install -y docker-ce-cli
42-
USER jenkins
43-
RUN jenkins-plugin-cli --plugins blueocean:1.24.4
44-
````
45-
- Build the image:
46-
````shell
47-
docker build -t myjenkins-blueocean:1.1 .
48-
````
49-
- Run your image as container:
50-
````shell
51-
docker run \
52-
--name jenkins-blueocean \
53-
--rm \
54-
--detach \
55-
--network jenkins \
56-
--env DOCKER_HOST=tcp://docker:2376 \
57-
--env DOCKER_CERT_PATH=/certs/client \
58-
--env DOCKER_TLS_VERIFY=1 \
59-
--publish 8080:8080 \
60-
--publish 50000:50000 \
61-
--volume jenkins-data:/var/jenkins_home \
62-
--volume jenkins-docker-certs:/certs/client:ro \
63-
myjenkins-blueocean:1.1
64-
````
65-
- Once you have run the container, please note that you have your jenkins files available in a docker volume. So, run the following commands to realize the same:
66-
````shell
67-
docker volume list
68-
````
69-
- Now that you have the container active, run:
70-
````shell
71-
docker ps -a
72-
````
73-
74-
- Get the initial password:
75-
````shell
76-
docker exec <container_name_or_id> cat /var/jenkins_home/secrets/initialAdminPassword
77-
````
7+
::: danger What was the problem?
8+
I needed to setup Continuous Integration for my Github Pages Website codestellar.github.io
9+
:::
7810

79-
::: tip To run bash commands inside your container
80-
docker exec -it <container_name_or_id> bash
11+
::: tip What was the solution?
12+
I used vuepress static site generator and setup continuous integration with Travis CI
8113
:::
8214

83-
::: warning
84-
Simply removing the container and images does not remove the volume
85-
:::
15+
[Learn More](/devops/setup-ci-with-travis-ci)
16+
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Jenkins: Getting Started
2+
3+
::: danger What was the problem?
4+
I wanted to set up my own CI Server as CI servers have minutes limit. Bitbucket has 50 min/month, Azure DevOps has 240 min/month, AWS Pipeline is paid.
5+
:::
6+
7+
::: tip What was the solution?
8+
I chose Jenkins as I can install it on my own server, had some initial problems like setting up the password, re-installations, containerizing. So, I summed it up here.
9+
:::
10+
11+
12+
Recently, I installed Jenkins on my ubuntu server, I read the documentation [here](https://www.jenkins.io/doc/book/installing/docker/) and here are the steps I followed:
13+
14+
- Installed Docker
15+
- Create a Docker Network
16+
````shell
17+
docker network create jenkins
18+
````
19+
20+
- To confirm that a network has been created, run:
21+
````shell
22+
docker network list
23+
````
24+
25+
- In order to be able to run docker commands inside jenkins nodes, install docker:dind image as follows:
26+
````shell
27+
docker run --name jenkins-docker --rm --detach \
28+
--privileged --network jenkins --network-alias docker \
29+
--env DOCKER_TLS_CERTDIR=/certs \
30+
--volume jenkins-docker-certs:/certs/client \
31+
--volume jenkins-data:/var/jenkins_home \
32+
--publish 2376:2376 docker:dind
33+
````
34+
35+
- Customise official Jenkins Docker image, by executing below two steps:
36+
- Create a docker file:
37+
````shell
38+
FROM jenkins/jenkins:2.263.3-lts-jdk11
39+
USER root
40+
RUN apt-get update && apt-get install -y apt-transport-https \
41+
ca-certificates curl gnupg2 \
42+
software-properties-common
43+
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
44+
RUN apt-key fingerprint 0EBFCD88
45+
RUN add-apt-repository \
46+
"deb [arch=amd64] https://download.docker.com/linux/debian \
47+
$(lsb_release -cs) stable"
48+
RUN apt-get update && apt-get install -y docker-ce-cli
49+
USER jenkins
50+
RUN jenkins-plugin-cli --plugins blueocean:1.24.4
51+
````
52+
- Build the image:
53+
````shell
54+
docker build -t myjenkins-blueocean:1.1 .
55+
````
56+
- Run your image as container:
57+
````shell
58+
docker run \
59+
--name jenkins-blueocean \
60+
--rm \
61+
--detach \
62+
--network jenkins \
63+
--env DOCKER_HOST=tcp://docker:2376 \
64+
--env DOCKER_CERT_PATH=/certs/client \
65+
--env DOCKER_TLS_VERIFY=1 \
66+
--publish 8080:8080 \
67+
--publish 50000:50000 \
68+
--volume jenkins-data:/var/jenkins_home \
69+
--volume jenkins-docker-certs:/certs/client:ro \
70+
myjenkins-blueocean:1.1
71+
````
72+
- Once you have run the container, please note that you have your jenkins files available in a docker volume. So, run the following commands to realize the same:
73+
````shell
74+
docker volume list
75+
````
76+
- Now that you have the container active, run:
77+
````shell
78+
docker ps -a
79+
````
80+
81+
- Get the initial password:
82+
````shell
83+
docker exec <container_name_or_id> cat /var/jenkins_home/secrets/initialAdminPassword
84+
````
85+
86+
::: tip To run bash commands inside your container
87+
docker exec -it <container_name_or_id> bash
88+
:::
89+
90+
::: warning
91+
Simply removing the container and images does not remove the volume
92+
:::
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Setup continuous integration with Travis CI
2+
3+
::: danger What was the problem?
4+
I needed to setup Continuous Integration for my Github Pages Website codestellar.github.io
5+
:::
6+
7+
::: tip What was the solution?
8+
I used vuepress static site generator and setup continuous integration with Travis CI
9+
:::

docs/javascript/k6.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Performance Testing using K6
2+
3+
::: danger What was the problem?
4+
I had to perform load testing of Web API.
5+
:::
6+
7+
::: tip What was the solution?
8+
I learnt and used K6 for load testing which allows me to write javascript code for writing load tests, is open source, can be integrated with Apache Kafka, Datadog, AWS Cloud Watch
9+
:::
10+
11+
Recently, I had to perform Performance Testing of my API(s) and I wanted to use JavaScript based utility for the same. I found [K6](https://k6.io/). K6 is a very nice tool to perform load testing for developers as it allows you to write simple JavaScript code to perform testing.
12+
13+
For my usecase, I am using https://petstore.swagger.io/ and followed the following steps:
14+
15+
-
16+
and here is the script that I wrote:
17+
18+
````js
19+
20+
````

0 commit comments

Comments
 (0)