Skip to content

Commit

Permalink
added
Browse files Browse the repository at this point in the history
  • Loading branch information
Milstein committed Dec 16, 2024
1 parent 3434c6f commit d877041
Show file tree
Hide file tree
Showing 16 changed files with 231 additions and 231 deletions.
20 changes: 10 additions & 10 deletions docs/openshift/applications/scaling-and-performance-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ CPU and memory can be specified in a couple of ways:

!!! note "Important Information"

If a Pod's total requests are not available on a single node, then the Pod
will remain in a *Pending* state (i.e. not running) until these resources
become available.
If a Pod's total requests are not available on a single node, then the Pod
will remain in a *Pending* state (i.e. not running) until these resources
become available.

- The **limit** value specifies the max value you can consume. Limit is the value
applications should be tuned to use. Pods will be memory, CPU throttled when
Expand Down Expand Up @@ -283,11 +283,11 @@ Click the **Observe** tab to:

!!! note "Detailed Monitoring your project and application metrics"

On the left navigation panel of the **Developer** perspective, click
**Observe** to see the Dashboard, Metrics, Alerts, and Events for your project.
For more information about Monitoring project and application metrics
using the Developer perspective, please
[read this](https://docs.openshift.com/container-platform/4.10/applications/odc-monitoring-project-and-application-metrics-using-developer-perspective.html).
On the left navigation panel of the **Developer** perspective, click
**Observe** to see the Dashboard, Metrics, Alerts, and Events for your project.
For more information about Monitoring project and application metrics
using the Developer perspective, please
[read this](https://docs.openshift.com/container-platform/4.10/applications/odc-monitoring-project-and-application-metrics-using-developer-perspective.html).

## Scaling manually

Expand Down Expand Up @@ -402,8 +402,8 @@ maximum numbers to maintain the specified CPU utilization across all pods.

!!! note "Configure via: Form or YAML View"

While creating or editing the horizontal pod autoscaler in the web console,
you can switch from **Form view** to **YAML view**.
While creating or editing the horizontal pod autoscaler in the web console,
you can switch from **Form view** to **YAML view**.

- From the **Add HorizontalPodAutoscaler** form, define the name, minimum and maximum
pod limits, the CPU and memory usage, and click **Save**.
Expand Down
8 changes: 4 additions & 4 deletions docs/openstack/access-and-security/security-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Enter the following values:

!!! note "Note"

To accept requests from a particular range of IP addresses, specify the
IP address block in the CIDR box.
To accept requests from a particular range of IP addresses, specify the
IP address block in the CIDR box.

The new rule now appears in the list. This signifies that any instances using
this newly added Security Group will now have SSH port 22 open for requests
Expand Down Expand Up @@ -143,8 +143,8 @@ Enter the following values:

!!! note "Note"

To accept requests from a particular range of IP addresses, specify the
IP address block in the CIDR box.
To accept requests from a particular range of IP addresses, specify the
IP address block in the CIDR box.

The new rule now appears in the list. This signifies that any instances using
this newly added Security Group will now have RDP port 3389 open for requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ In the Create Network dialog box, specify the following values.
networks, you should use IP addresses which fall within the ranges that are
specifically reserved for private networks:

10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16

In the example below, we configure a network containing addresses 192.168.0.1
to 192.168.0.255 using CIDR 192.168.0.0/24
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ parts are `EC2_ACCESS_KEY` and `EC2_SECRET_KEY`, keep them noted.
- Allow Other User option by editing fuse config by editing `/etc/fuse.conf` file
and uncomment "user_allow_other" option.

sudo nano /etc/fuse.conf
sudo nano /etc/fuse.conf

The output going to look like this:

Expand Down
2 changes: 1 addition & 1 deletion docs/openstack/persistent-storage/object-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ This is a python client for the Swift API. There's a [Python API](https://github
- This example uses a `Python3` virtual environment, but you are free to choose
any other method to create a local virtual environment like `Conda`.

python3 -m venv venv
python3 -m venv venv

!!! note "Choosing Correct Python Interpreter"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ workflow.

!!! info "Very Important Information"

Workflow execution on OpenShift pipelines follows these steps:

1. Checkout your repository
2. Perform a container image build
3. Push the built image to the GitHub Container Registry (GHCR) or
your preferred Registry
4. Log in to your NERC OpenShift cluster's project space
5. Create an OpenShift app from the image and expose it to the internet
Workflow execution on OpenShift pipelines follows these steps:

1. Checkout your repository
2. Perform a container image build
3. Push the built image to the GitHub Container Registry (GHCR) or
your preferred Registry
4. Log in to your NERC OpenShift cluster's project space
5. Create an OpenShift app from the image and expose it to the internet

8. Edit the top-level 'env' section as marked with '🖊️' if the defaults are not
suitable for your project.
Expand Down
126 changes: 63 additions & 63 deletions docs/other-tools/CI-CD/jenkins/setup-jenkins-CI-CD-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ _Figure: CI/CD Pipeline To Deploy To Kubernetes Cluster Using Jenkins on NERC_
- [Assign a Floating IP](../../../openstack/create-and-connect-to-the-VM/assign-a-floating-IP.md)
to your new instance so that you will be able to ssh into this machine:

ssh ubuntu@<Floating-IP> -A -i <Path_To_Your_Private_Key>
ssh ubuntu@<Floating-IP> -A -i <Path_To_Your_Private_Key>

For example:

ssh ubuntu@199.94.60.4 -A -i cloud.key
ssh ubuntu@199.94.60.4 -A -i cloud.key

Upon successfully SSH accessing the machine, execute the following dependencies:

Expand All @@ -45,29 +45,29 @@ Upon successfully SSH accessing the machine, execute the following dependencies:

- Update the repositories and packages:

sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get update && sudo apt-get upgrade -y

- Turn off `swap`

swapoff -a
sudo sed -i '/ swap / s/^/#/' /etc/fstab
swapoff -a
sudo sed -i '/ swap / s/^/#/' /etc/fstab

- Install `curl` and `apt-transport-https`

sudo apt-get update && sudo apt-get install -y apt-transport-https curl
sudo apt-get update && sudo apt-get install -y apt-transport-https curl

---

## Download and install the latest version of **Docker CE**

- Download and install Docker CE:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

- Configure the Docker daemon:

sudo usermod -aG docker $USER && newgrp docker
sudo usermod -aG docker $USER && newgrp docker

---

Expand All @@ -77,23 +77,23 @@ Upon successfully SSH accessing the machine, execute the following dependencies:

- Download the Google Cloud public signing key and add key to verify releases

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo \
apt-key add -
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo \
apt-key add -

- add kubernetes apt repo

cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF

- Install kubectl

sudo apt-get update
sudo apt-get install -y kubectl
sudo apt-get update
sudo apt-get install -y kubectl

- `apt-mark hold` is used so that these packages will not be updated/removed automatically

sudo apt-mark hold kubectl
sudo apt-mark hold kubectl

---

Expand Down Expand Up @@ -252,79 +252,79 @@ To create a fork of the example `nodeapp` repository:

!!! warning "Very Important Information"

You need to replace "`<dockerhub_username>`" and "`<github_username>`"
with your actual DockerHub and GitHub usernames, respectively. Also,
ensure that the global credentials IDs mentioned above match those used
during the credential saving steps mentioned earlier. For instance,
`dockerhublogin` corresponds to the **DockerHub** ID saved during the
credential saving process for your Docker Hub Registry's username and
password. Similarly, `kubernetes` corresponds to the **'Kubeconfig'** ID
assigned for the Kubeconfig credential file.
You need to replace "`<dockerhub_username>`" and "`<github_username>`"
with your actual DockerHub and GitHub usernames, respectively. Also,
ensure that the global credentials IDs mentioned above match those used
during the credential saving steps mentioned earlier. For instance,
`dockerhublogin` corresponds to the **DockerHub** ID saved during the
credential saving process for your Docker Hub Registry's username and
password. Similarly, `kubernetes` corresponds to the **'Kubeconfig'** ID
assigned for the Kubeconfig credential file.

- Below is an example of a Jenkins declarative Pipeline Script file:

pipeline {

environment {
dockerimagename = "<dockerhub_username>/nodeapp:${env.BUILD_NUMBER}"
dockerImage = ""
}
environment {
dockerimagename = "<dockerhub_username>/nodeapp:${env.BUILD_NUMBER}"
dockerImage = ""
}

agent any
agent any

stages {
stages {

stage('Checkout Source') {
steps {
git branch: 'main', url: 'https://github.com/<github_username>/nodeapp.git'
stage('Checkout Source') {
steps {
git branch: 'main', url: 'https://github.com/<github_username>/nodeapp.git'
}
}
}

stage('Build image') {
steps{
script {
dockerImage = docker.build dockerimagename
stage('Build image') {
steps{
script {
dockerImage = docker.build dockerimagename
}
}
}
}

stage('Pushing Image') {
environment {
registryCredential = 'dockerhublogin'
}
steps{
script {
docker.withRegistry('https://registry.hub.docker.com', registryCredential){
dockerImage.push()
stage('Pushing Image') {
environment {
registryCredential = 'dockerhublogin'
}
steps{
script {
docker.withRegistry('https://registry.hub.docker.com', registryCredential){
dockerImage.push()
}
}
}
}
}

stage('Docker Remove Image') {
steps {
sh "docker rmi -f ${dockerimagename}"
sh "docker rmi -f registry.hub.docker.com/${dockerimagename}"
stage('Docker Remove Image') {
steps {
sh "docker rmi -f ${dockerimagename}"
sh "docker rmi -f registry.hub.docker.com/${dockerimagename}"
}
}
}

stage('Deploying App to Kubernetes') {
steps {
sh "sed -i 's/nodeapp:latest/nodeapp:${env.BUILD_NUMBER}/g' deploymentservice.yml"
withKubeConfig([credentialsId: 'kubernetes']) {
sh 'kubectl apply -f deploymentservice.yml'
stage('Deploying App to Kubernetes') {
steps {
sh "sed -i 's/nodeapp:latest/nodeapp:${env.BUILD_NUMBER}/g' deploymentservice.yml"
withKubeConfig([credentialsId: 'kubernetes']) {
sh 'kubectl apply -f deploymentservice.yml'
}
}
}
}
}

}

!!! question "Other way to Generate Pipeline Jenkinsfile"

You can generate your custom Jenkinsfile by clicking on **"Pipeline Syntax"**
link shown when you create a new Pipeline when clicking the "New Item" menu
link.
You can generate your custom Jenkinsfile by clicking on **"Pipeline Syntax"**
link shown when you create a new Pipeline when clicking the "New Item" menu
link.

## Setup a Pipeline

Expand Down
Loading

0 comments on commit d877041

Please sign in to comment.