Skip to content

Commit

Permalink
Merge pull request #180 from cloudbees-days/cd-ro-workshop
Browse files Browse the repository at this point in the history
Update building Application
  • Loading branch information
zvercodebender committed Sep 20, 2023
2 parents 9d16b91 + 769dfc9 commit cb3b722
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 23 deletions.
Binary file not shown.
Binary file modified labs/cloudbees-cdro-v2/content/labs/03_basic-release/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 19 additions & 7 deletions labs/cloudbees-cdro-v2/content/labs/04_microservice-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ As you can see, there are two big components standing out here. There is the mic

First we'll start with the microservice definition on the left. This is where you'll specify the Helm chart you want to deploy as well as any values you need to pass in.

To begin, click the inner, pink "New microservice" button which will bring up the necessary form.
To begin, click on the blue "Add microservice" button which will bring up the necessary form.
![New microservice button](new-microservice-button.png)


Expand All @@ -104,7 +104,7 @@ Next you need to fill out the definition form.
| Description | *optional* | A field to help understand the context of this application |
| Definition type | `Helm` | The type of microservice deployment you want to run |
| Definition source | `Git repository` | The source for where to look for the target Helm chart. It could be a Helm registry, but for this workshop we're using a Git repo. |
| Configuration Name | `Git Bot` | The credentials to use for the Git connection when pulling the repository. In this case, we'll be using a shared GitHub service account since the repository is public. |
| Configuration Name | `cb-bot-Workshop` | The credentials to use for the Git connection when pulling the repository. In this case, we'll be using a shared GitHub service account since the repository is public. |
| Git repository | https://github.com/cloudbees-days/cdro-workshop-demo-app | The target repository where it will look for the Helm chart |
| Remote branch | `main` | The branch in GitHub it will checkout |
| Release name | `hello-app` | The name Helm will use to track your app release |
Expand Down Expand Up @@ -140,7 +140,7 @@ Now hit "OK" and the microservice component will be created.

Now, before we're able to deploy our newly-defined application, we need to define an environment to deploy it into.

Get started by clicking the "New cluster" button on the right side.
Get started by clicking the blue "+" button on the right side.
![New cluster](new-environment-1.png)

*It should be noted that we aren't creating a new Kubernetes cluster, but rather a new environment definition based on a cluster.*
Expand All @@ -155,16 +155,28 @@ Now you'll define the cluster environment.
| Environment name | `QA` | The name to identify your environment |
| Project | Select your project | The project inside which this environment will be stored |
| Environment description | *Optional* | A field to give textual details about this environment |
| Utility resource name | k8s-agent |

![New cluster - part 3](new-environment-3.png)

Next you'll define the cluster reference.

| Field | Value | Description |
| --- | --- | --- |
| Cluster name | `default` | A name to identify this cluster |
| Cluster description | *Optional* | A field to give textual details about this cluster |
| Configuration provider | `Kubernetes (via Helm)` | The type of environment you're defining |
| Configuration name | `helm` | A reference to a configuration that lets CD/RO know where to use Helm |
| Configuration name | `k8s-Workshop` | A reference to a configuration that lets CD/RO know where to use Helm |
| Namespace | `my-username-qa` | The Kubernetes namespace where your application will be deployed. You should update this to be YOUR_USERNAME-qa. |
| Kubeconfig context | | This allows you to target a specific cluster if your configuration is pointed at multiple. For this workshop you can leave this blank. |
| Utility resource name | `k8s-agent` | This is the name to identify the utility resource |
| Resource | `k8s-agent` | This is the agent which will communicate with the Kubernetes cluster |
| Utility resource name | `kubectl` | This is the name to identify the utility resource |
| Resource | `kubectl` | This is the agent which will communicate with the Kubernetes cluster |

![New cluster - part 3](new-environment-3.png)
![New cluster - part 3](new-environment-4.png)

The last step in configuring our microservice application is to map the microservice (hello-app) to your environment (QA). To do that click on the ![Add mapping](AddMapping.png) button and map your application

| ![mapping](mappingTile.ppng) | ![mapped](mapedApplication.png) |


## Running the deployment
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ release args.releaseName, {
iconUrl = 'icon-pipeline.svg'
useFormalParameter = '1'

formalParameter 'releaseName', {
formalParameter 'releaseName', defaultValue: '$[/myUser/userName] Release', {
label = 'Release Name'
orderIndex = '1'
required = '1'
type = 'entry'
}

formalParameter 'releaseTag', {
formalParameter 'releaseTag', defaultValue: 'PROD', {
label = 'Release Tags'
orderIndex = '2'
required = '1'
Expand Down
16 changes: 2 additions & 14 deletions labs/cloudbees-cdro-v2/support/dsl/pipeline_Base.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -71,29 +71,17 @@ pipeline 'pipeline_Base', {
colorCode = '#ff7f0e'
pipelineName = 'pipeline_Base'
task 'Deploy to QA', {
command = 'echo "Deploy to QA"'
command = 'echo "replace me"'
taskType = 'COMMAND'
}
}

stage 'Production', {
colorCode = '#2ca02c'
pipelineName = 'pipeline_Base'
gate 'PRE', {
task 'Manual approval', {
gateType = 'PRE'
notificationEnabled = '1'
notificationTemplate = 'ec_default_gate_task_notification_template'
subproject = 'Workshop'
taskType = 'APPROVAL'
approver = [
'rbroker',
]
}
}

task 'Deploy to Production', {
command = 'echo "Deploy to Production"'
command = 'echo "replace me"'
taskType = 'COMMAND'
}
}
Expand Down

0 comments on commit cb3b722

Please sign in to comment.