Skip to content

Commit b7451b7

Browse files
authored
Add content from repo (#3)
* Add web icon * Use markdownlint-cli2 in gitlab pipeline * Add files from ci-pipeline-samples repo * Add content from epinio-samples repo * Add files from rancher-ecosystem repo * Fix markdown issues * Fix site build issues
1 parent 187234d commit b7451b7

File tree

93 files changed

+2563
-168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+2563
-168
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
workflow:
1+
workflow:
22
rules:
33
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
44
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
@@ -11,8 +11,8 @@ lint-markdown:
1111
stage: build
1212
image: node:lts
1313
script:
14-
- npm install -g markdownlint-cli
15-
- markdownlint "**/*.md"
14+
- npm install -g markdownlint-cli2
15+
- markdownlint-cli2 "**/*.md"
1616

1717
lint-yaml:
1818
stage: build

CONTRIBUTING.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,3 @@ Check Markdown files:
6464
```bash
6565
docker run --rm -v "$(pwd)":/workdir davidanson/markdownlint-cli2 "**/*.md"
6666
```
67-
68-
Reproduce locally GitLab jobs:
69-
70-
```bash
71-
mkdir -p .gitlab/runner/local
72-
docker run --rm --name gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock -v $PWD/.gitlab/runner/local/config:/etc/gitlab-runner -v $PWD:$PWD --workdir $PWD gitlab/gitlab-runner exec docker lint-markdown
73-
docker run --rm --name gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock -v $PWD/.gitlab/runner/local/config:/etc/gitlab-runner -v $PWD:$PWD --workdir $PWD gitlab/gitlab-runner exec docker lint-yaml
74-
```

docs/fundamentals/standards/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Glossary
1+
# Glossary
22

33
## IT
44

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Bamboo Data Center
2+
3+
## Introduction
4+
5+
> Bamboo Data Center is a continuous delivery pipeline that offers resilience, reliability, and scalibility for teams of any size.
6+
7+
[atlassian.com/software/bamboo](https://www.atlassian.com/software/bamboo)
8+
9+
## Setup
10+
11+
### Build the custom image
12+
13+
Create `.bamboo/server/Dockerfile` file:
14+
15+
```Dockerfile
16+
# starts from the base image provided by Atlassian: https://hub.docker.com/r/atlassian/bamboo-server (7.2.2 based on Ubuntu 20.04.1 LTS, codename focal)
17+
FROM atlassian/bamboo-server:7.2.2
18+
19+
# switches to root user for admin commands
20+
USER root
21+
22+
# installs system requirements
23+
RUN apt-get update
24+
RUN apt-get install -y apt-transport-https \
25+
ca-certificates \
26+
wget \
27+
curl \
28+
gnupg-agent \
29+
software-properties-common
30+
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
31+
RUN add-apt-repository \
32+
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
33+
$(lsb_release -cs) \
34+
stable"
35+
RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
36+
&& dpkg -i packages-microsoft-prod.deb
37+
RUN apt-get update
38+
39+
# installs Docker: https://docs.docker.com/engine/install/ubuntu/
40+
RUN apt-get install -y docker-ce \
41+
docker-ce-cli \
42+
containerd.io
43+
RUN usermod -a -G docker bamboo
44+
45+
# installs .NET SDK LTS: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu
46+
RUN apt-get install -y dotnet-sdk-3.1
47+
RUN apt-get install -y dotnet-sdk-5.0
48+
49+
# switches back to bamboo user
50+
USER bamboo
51+
52+
# updates image entrypoint with commands that can only be ran when the container starts
53+
RUN echo "chown root:docker /var/run/docker.sock" >> /entrypoint.sh
54+
```
55+
56+
```bash
57+
# creates a new image
58+
docker build . -t devprofr/bamboo-server -f .bamboo/server/Dockerfile --no-cache
59+
```
60+
61+
### Run the custom image
62+
63+
```bash
64+
docker volume create --name bambooVolume
65+
66+
# for Linux
67+
docker run -v /var/run/docker.sock:/var/run/docker.sock -v bambooVolume:/var/atlassian/application-data/bamboo --name="bamboo" --init -d -p 54663:54663 -p 8085:8085 devprofr/bamboo-server
68+
69+
# for Windows
70+
docker run -v //var/run/docker.sock:/var/run/docker.sock -v bambooVolume:/var/atlassian/application-data/bamboo --name="bamboo" --init -d -p 54663:54663 -p 8085:8085 devprofr/bamboo-server
71+
```
72+
73+
### Configuration
74+
75+
Open [localhost:8085](http://localhost:8085/)
76+
77+
#### Set server capabilities
78+
79+
_Limitation 2021-02-28_: Unfortunately it is not possible to automate it through an API call
80+
81+
You have to manually go to this page ["Bamboo administration > Server capabilities"](http://localhost:8085/admin/agent/configureSharedLocalCapabilities.action) and set the server capabilities (if not present), it must be done only once/
82+
83+
Category | Executable / Label | Path | Bamboo key
84+
-----------|--------------------|-------------------|--------------------------------
85+
Executable | dotnet | `/usr/bin/dotnet` | `system.builder.command.dotnet`
86+
Docker | Docker | `/usr/bin/docker` | `system.docker.executable`
87+
88+
### Troubleshooting
89+
90+
```bash
91+
docker exec -it bamboo sh
92+
docker exec -u 0 -it bamboo bash
93+
```
94+
95+
### Clean-up
96+
97+
```bash
98+
docker stop bamboo
99+
docker rm bamboo
100+
```
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Bitbucket (Cloud)
2+
3+
## Introduction
4+
5+
> Bitbucket is more than just Git code management.
6+
> Bitbucket gives teams one place to plan projects, collaborate on code, test, and deploy.
7+
8+
[bitbucket.org/product](https://bitbucket.org/product/)
9+
10+
## Setup
11+
12+
Create a file `bitbucket-pipelines.yml`:
13+
14+
```yml
15+
image: mcr.microsoft.com/dotnet/sdk:5.0
16+
17+
pipelines:
18+
default:
19+
- parallel:
20+
- step:
21+
name: Build and Test
22+
caches:
23+
- dotnetcore
24+
script:
25+
- REPORTS_PATH=./test-reports/build_${BITBUCKET_BUILD_NUMBER}
26+
- cd samples/dotnet
27+
- dotnet restore
28+
- dotnet build --no-restore --configuration Release
29+
- dotnet test --no-build --configuration Release --test-adapter-path:. --logger:"junit;LogFilePath=$REPORTS_PATH/junit.xml"
30+
- step:
31+
name: Lint the code
32+
caches:
33+
- dotnetcore
34+
script:
35+
- export SOLUTION_NAME=Devpro.CIToolsDemo
36+
- export REPORTS_PATH=linter-reports
37+
- cd samples/dotnet
38+
- dotnet new tool-manifest
39+
- dotnet tool install JetBrains.ReSharper.GlobalTools --version 2021.1.0-eap02
40+
- dotnet tool restore
41+
- dotnet jb inspectcode ${SOLUTION_NAME}.sln --output="${REPORTS_PATH}/jb-${BITBUCKET_BUILD_NUMBER}.xml"
42+
artifacts:
43+
- linter-reports/**
44+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Code pipelines
2+
3+
Let's explore different tools to implement CI pipelines!
4+
5+
## Platforms
6+
7+
Platform | Typology
8+
--------------------------------------|------------------------
9+
Azure DevOps | Cloud
10+
[Bamboo Data Center](bamboo.md) | Self-hosted (container)
11+
[Bitbucket Cloud](bitbucket-cloud.md) | Cloud
12+
[Concourse](concourse.md) | Self-hosted (container)
13+
GitHub | Cloud
14+
GitLab | Cloud
15+
[TeamCity Professional](teamcity.md) | Self-hosted (container)
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Concourse samples
2+
3+
Comprehensive samples to quickly get up to speed with [Concourse](../../../organizations/communities/concourse/concourse.md).
4+
5+
## Requirements
6+
7+
* Have an account to a running Concourse instance
8+
* For the first time, you can use the local containers with `docker compose -f samples/concourse/compose.yml up -d`
9+
* You can also deploy it in a Kubernetes cluster with [Helm chart](https://github.com/devpro/helm-charts/tree/feature/concourse/charts/concourse)
10+
* Ultimately, you can run it on a [VM](https://github.com/devpro/information-technology-guide/blob/main/docs/communities/concourse/ubuntu-install.md)
11+
12+
* Have `fly` executable on the machine running the command lines (careful with the version that needs to match the one from Concourse instance)
13+
* Grab it from the [releases GitHub page](https://github.com/concourse/concourse/releases) or from the running Concourse web page
14+
15+
## Samples
16+
17+
### Login
18+
19+
```bash
20+
fly --target localhost login --concourse-url http://localhost:8080/
21+
```
22+
23+
### Pipelines
24+
25+
* Hello world
26+
27+
Login on localhost:
28+
29+
```bash
30+
fly --target localhost set-pipeline --pipeline helloworld --config samples/concourse/tasks/basic/01_helloworld.yml
31+
32+
# enables the pipeline and run it (can also be done from http://localhost:8080/teams/main/pipelines/helloworld, click on play symbol then on + symbol)
33+
fly -t localhost unpause-pipeline -p helloworld
34+
fly -t localhost trigger-job -j helloworld/job
35+
```
36+
37+
* .NET
38+
39+
```bash
40+
fly --target localhost set-pipeline --pipeline aspnetcore --config samples/concourse/tasks/dotnet/01_aspnetcore.yml
41+
42+
fly -t localhost unpause-pipeline -p aspnetcore
43+
44+
fly -t localhost trigger-job -j aspnetcore/build-webapp
45+
46+
fly --target localhost set-pipeline --pipeline dotnetglobaltool --config pipelines/dotnetcore/02_globaltool.yml --var mdbatlas-publickey=xxxx --var mdbatlas-publickey=yyyy -var almops-token=zzz --var almops-org=xxxx -var almops-user=yyyy -var almops-token=zzz
47+
48+
fly -t localhost unpause-pipeline -p dotnetglobaltool
49+
50+
fly -t localhost trigger-job -j dotnetglobaltool/mongodb-atlas -w
51+
fly -t localhost trigger-job -j dotnetglobaltool/azure-devops -w
52+
```
53+
54+
### Tasks
55+
56+
* Hello world
57+
58+
```bash
59+
fly --target localhost login --concourse-url http://localhost:8080/
60+
61+
fly -t localhost execute --config samples/concourse/tasks/basic/helloworld.yml
62+
```
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# TeamCity
2+
3+
In this tutorial we'll setup an instance of TeamCity, running on Docker, and configure a CI pipeline on the code samples available in this repository.
4+
5+
## Setup
6+
7+
### Create local folders
8+
9+
```bash
10+
# creates local folders to store TeamCity run files
11+
md data logs agent
12+
md agent/conf
13+
```
14+
15+
### Run TeamCity server in a container
16+
17+
```bash
18+
# starts the container
19+
docker run -it --name teamcity-server -v $PWD/data:/data/teamcity_server/datadir -v $PWD/logs:/opt/teamcity/logs -p 8111:8111 jetbrains/teamcity-server
20+
21+
# if stopped, starts again the container
22+
docker start teamcity-server
23+
```
24+
25+
### Run TeamCity agent in a container
26+
27+
#### Use the Docker image
28+
29+
```bash
30+
docker run -it --name teamcity-agent -e SERVER_URL="http://teamcity-server:8111" -v $PWD/agent/conf:/data/teamcity_agent/conf --link teamcity-server jetbrains/teamcity-agent
31+
```
32+
33+
[hub.docker.com](https://hub.docker.com/r/jetbrains/teamcity-agent/)
34+
35+
#### Use a custom image
36+
37+
The default image may not contain all the needed tools for the pipeline to run.
38+
39+
TODO
40+
41+
### Clean-up
42+
43+
```bash
44+
docker rm teamcity-server teamcity-agent
45+
```
46+
47+
## Configuration
48+
49+
### First TeamCity configuration
50+
51+
* Open [localhost:8111](http://localhost:8111)
52+
* Log-in with empty username and the token shown in the container log file
53+
* Go to the "Administration" section and click on "Users" to create a new user account (make sure to give the super administrative privilege)
54+
* Authorize the agent [localhost:8111/agents](http://localhost:8111/agents.html?tab=unauthorizedAgents)
55+
* Go to the "Projects" section and create a new project (use `https://github.com/devpro/ci-pipeline-samples` as repository URL)
56+
* Use "Auto-detected Build Steps" to have TeamCity review what is needed (you can select everything except the NuGet and msbuild step)
57+
* Review steps and step names and start a new build

docs/guides/workstations/ubuntu/ubuntu.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Ubuntu
1+
# Ubuntu
22

33
The following instructions target **Ubuntu 24.04**.
44
For previous instructions: [Ubuntu 20.04](archive/ubuntu-20_04.md).
@@ -10,6 +10,7 @@ For previous instructions: [Ubuntu 20.04](archive/ubuntu-20_04.md).
1010
```bash
1111
sudo apt update
1212
sudo apt -y upgrade
13+
sudo apt autoremove
1314
```
1415

1516
## Packages

docs/guides/workstations/windows/windows.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Windows
1+
# Windows
22

33
The following instructions target **Windows 11**.
44
For previous versions: [Windows 10](archive/windows-10.md).
@@ -29,8 +29,7 @@ For previous versions: [Windows 10](archive/windows-10.md).
2929

3030
### Utilities
3131

32-
- KeePass
33-
- Plugins: [KeeTheme](https://github.com/xatupal/KeeTheme) (dark theme)
32+
- Password manager: 1Password, or KeePass (with [KeeTheme](https://github.com/xatupal/KeeTheme)) for example
3433
- WinDirStat
3534

3635
```batch
@@ -48,9 +47,9 @@ For previous versions: [Windows 10](archive/windows-10.md).
4847
1. [Visual Studio Code](../../../organizations/companies/microsoft/vscode.md)
4948
2. Git
5049
3. Notepad++
51-
4. [MongoDB Compass](https://www.mongodb.com/try/download/compass)
52-
5. [Visual Studio 2022](../../../organizations/companies/microsoft/vs2022.md) or [Rider](https://www.jetbrains.com/rider/)
53-
6. [WebStorm](https://www.jetbrains.com/webstorm/)
50+
4. [MongoDB Compass](../../../organizations/companies/mongodb/compass.md)
51+
5. [Rider](../../../organizations/companies/jetbrains/rider.md) or [Visual Studio 2026](../../../organizations/companies/microsoft/vs2026.md)
52+
6. [WebStorm](../../../organizations/companies/jetbrains/webstorm.md)
5453
5554
### Office
5655

0 commit comments

Comments
 (0)