Step 1: Launch EC2 (Ubuntu 24.04):
- Provision an EC2 instance on AWS with Ubuntu 24.04 Use T3.large this machine wll host jenkins and sonarqube. These tools require a minimal CUP In security group section, select HTTPS (allow jenkins to get acces to our dokcerhub) and http Add 25 GB for the disk Create an Elastic Ip and attach it to your EC2 instance. The Ec2 will have an static ip address even if you close you EC2 instance.
- Connect to the instance using SSH.
Step 2: Clone the Code:
-
Once your Instance is ready, Update all the packages and then clone the code.
-
Clone your application's code repository onto the EC2 instance:
git clone https://github.com/fleury12/DevSecOps-Project.git
Step 3: Install Docker and Run the App Using a Container:
-
Set up Docker on the EC2 instance:
sudo apt-get update sudo apt-get install docker.io -y sudo usermod -aG docker $USER # Replace with your system's username, e.g., 'ubuntu' newgrp docker #it alow you to execute docker command
-
Build and run your application using Docker containers:
docker build -t netflix . docker run -d --name netflix -p 8081:80 netflix:latest #to delete docker stop <containerid> docker rmi -f netflix
Before getting access, make sure to add this port in the security group of this instance. Go to AWS CLI -> EC2 instance -> secutity -> security group -> edit inbound rules . source 0.0.0.0/0 It will show an error cause you need API key
Step 4: Get the API Key:
- Open a web browser and navigate to TMDB (The Movie Database) website.
- Click on "Login" and create an account.
- Once logged in, go to your profile and select "Settings."
- Click on "API" from the left-side panel.
- Create a new API key by clicking "Create" and accepting the terms and conditions.
- Provide the required basic details and click "Submit."
- You will receive your TMDB API key.
Now recreate the Docker image with your api key:
docker build --build-arg TMDB_V3_API_KEY=<your-api-key> -t netflix .
Application runs on this instance
Phase 2: Security
-
Install SonarQube and Trivy: Sonarqube is a tool that helps to scan vulnerabilities on you code. On the contrary, trivy helps to scann file system,repository and images.
-
Install SonarQube and Trivy on the EC2 instance to scan for vulnerabilities.
sonarqube
docker run -d --name sonar -p 9000:9000 sonarqube:lts-communityTo access:
publicIP:9000 (by default username & password is admin)
Before getting access, make sure to add this port in the security group of this instance. Go to AWS CLI -> EC2 instance -> secutity -> security group -> edit inbound rules . source 0.0.0.0/0
you will be asked to change this password.
To install Trivy:
sudo apt-get install wget apt-transport-https gnupg lsb-release wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add - echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list sudo apt-get update sudo apt-get install trivyto scan image using trivy
trivy image <imageid>
-
-
Integrate SonarQube and Configure:
- Configure SonarQube to analyze code for quality and security issues. create a project manually ( name and key : Netflix )
Phase 3: CI/CD Setup
-
Install Jenkins for Automation:
- Install Jenkins on the EC2 instance to automate deployment: Install Java
sudo apt update sudo apt install fontconfig openjdk-17-jre java -version openjdk version "17.0.8" 2023-07-18 OpenJDK Runtime Environment (build 17.0.8+7-Debian-1deb12u1) OpenJDK 64-Bit Server VM (build 17.0.8+7-Debian-1deb12u1, mixed mode, sharing) #jenkins sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null sudo apt-get update sudo apt-get install jenkins sudo systemctl start jenkins sudo systemctl enable jenkins
-
Access Jenkins in a web browser using the public IP of your EC2 instance.
publicIp:8080 Before getting access, make sure to add this port in the security group of this instance. Go to AWS CLI -> EC2 instance -> secutity -> security group -> edit inbound rules. source 0.0.0.0/0
-
Install Necessary Plugins in Jenkins:
Goto Manage Jenkins →Plugins → Available Plugins →
Install below plugins
1 Eclipse Temurin Installer (Install without restart)
2 SonarQube Scanner (Install without restart)
3 NodeJs Plugin (Install Without restart)
4 Email Extension Plugin
Goto Manage Jenkins → Tools → Install JDK(17) and NodeJs(16)→ seclect install automatically jdk-17.0.8.1+1 (name: sonar-scaner) NodesJs 16.2.0 (name: node16) Click on Apply and Save
Jenkins pipeline will use sonarqube in our pipeline. Then he needs to get acces. Create the token Go to sonarqube Administrator -> Security -> Users -> Tokens (create a token)
Conenct sonarqube and jenkins Goto Jenkins Dashboard → Manage Jenkins → Credentials → Add Secret Text. It should look like this
After adding sonar token (name like sonar-token)
Click on Apply and Save
The Configure System option is used in Jenkins to configure different server we need to create sonarqube server name: sonar-server add server URL : publicIp:9000 select the authntication token
Global Tool Configuration is used to configure different tools that we install using Plugins
We will install a sonar scanner in the tools.
Create a Jenkins webhook
Go to Sonarqube -> Administration -> Configure -> webhook -> add jenkins url :
http://publicIp:8080/sonarqube-webhook
- Configure CI/CD Pipeline in Jenkins:
- Create a CI/CD pipeline in Jenkins to automate your application deployment. Make sure that the name of jdk , nodejs; scanner tools match with our tools configuration
pipeline {
agent any
tools {
jdk 'jdk17'
nodejs 'node16'
}
environment {
SCANNER_HOME = tool 'sonar-scanner'
}
stages {
stage('clean workspace') {
steps {
cleanWs()
}
}
stage('Checkout from Git') {
steps {
git branch: 'main', url: 'https://github.com/fleury12/DevSecOps-Project.git'
}
}
stage("Sonarqube Analysis") {
steps {
withSonarQubeEnv('sonar-server') {
sh '''$SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=Netflix \
-Dsonar.projectKey=Netflix'''
}
}
}
stage("quality gate") {
steps {
script {
waitForQualityGate abortPipeline: false, credentialsId: 'Sonar-token'
}
}
}
stage('Install Dependencies') {
steps {
sh "npm install"
}
}
}
}The quality gate stage require a weebhook in sonarquebe inorder to infmor jenkins that it has finished
Certainly, here are the instructions without step numbers:
Install Dependency-Check and Docker Tools in Jenkins
Install Dependency-Check Plugin:
- Go to "Dashboard" in your Jenkins web interface.
- Navigate to "Manage Jenkins" → "Manage Plugins."
- Click on the "Available" tab and search for "OWASP Dependency-Check."
- Check the checkbox for "OWASP Dependency-Check" and click on the "Install without restart" button.
Configure Dependency-Check Tool:
- After installing the Dependency-Check plugin, you need to configure the tool.
- Go to "Dashboard" → "Manage Jenkins" → "Global Tool Configuration."
- Find the section for "OWASP Dependency-Check."
- Add the tool's name, e.g., "DP-Check."
- Save your settings. *configure Dp-Check tools: name : Dp-Check select install automatically dependency-check 12.1.9
Install Docker Tools and Docker Plugins: we will use docker to build our container and run it
- Go to "Dashboard" in your Jenkins web interface.
- Navigate to "Manage Jenkins" → "Manage Plugins."
- Click on the "Available" tab and search for "Docker."
- Check the following Docker-related plugins:
- Docker
- Docker Commons
- Docker Pipeline
- Docker API
- docker-build-step
- Click on the "Install without restart" button to install these plugins.
Add DockerHub Credentials: To allow jenkin to have acces to your dockerub accoutn, you need to set you dockerhub credential in jenkins
- To securely handle DockerHub credentials in your Jenkins pipeline, follow these steps:
- Go to "Dashboard" → "Manage Jenkins" → "Manage Credentials."
- Click on "System" and then "Global credentials (unrestricted)."
- Click on "Add Credentials" on the left side.
- Choose "Secret text" as the kind of credentials.
- Enter your DockerHub credentials (Username and Password) and give the credentials an ID (e.g., "docker").
- Click "OK" to save your DockerHub credentials.
*configure docker tools: name : name select install automatically lates version
Now, you have installed the Dependency-Check plugin, configured the tool, and added Docker-related plugins along with your DockerHub credentials in Jenkins. You can now proceed with configuring your Jenkins pipeline to include these tools and credentials in your CI/CD process.
pipeline{
agent any
tools{
jdk 'jdk17'
nodejs 'node16'
}
environment {
SCANNER_HOME=tool 'sonar-scanner'
}
stages {
stage('clean workspace'){
steps{
cleanWs()
}
}
stage('Checkout from Git'){
steps{
git branch: 'main', url: 'https://github.com/N4si/DevSecOps-Project.git'
}
}
stage("Sonarqube Analysis "){
steps{
withSonarQubeEnv('sonar-server') {
sh ''' $SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=Netflix \
-Dsonar.projectKey=Netflix '''
}
}
}
stage("quality gate"){
steps {
script {
waitForQualityGate abortPipeline: false, credentialsId: 'Sonar-token'
}
}
}
stage('Install Dependencies') {
steps {
sh "npm install"
}
}
stage('OWASP FS SCAN') {
steps {
dependencyCheck additionalArguments: '--scan ./ --disableYarnAudit --disableNodeAudit', odcInstallation: 'DP-Check'
dependencyCheckPublisher pattern: '**/dependency-check-report.xml'
}
}
stage('TRIVY FS SCAN') {
steps {
sh "trivy fs . > trivyfs.txt"
}
}
stage("Docker Build & Push"){
steps{
script{
withDockerRegistry(credentialsId: 'docker', toolName: 'docker'){
sh "docker build --build-arg TMDB_V3_API_KEY=<yourapikey> -t netflix ."
sh "docker tag netflix fleury12/netflix:latest "
sh "docker push fleury12/netflix:latest "
}
}
}
}
stage("TRIVY"){
steps{
sh "trivy image fleury12/netflix:latest > trivyimage.txt"
}
}
stage('Deploy to container'){
steps{
sh 'docker run -d --name netflix -p 8081:80 fleury12/netflix:latest'
}
}
}
}
If you get docker login failed errorr
sudo su
sudo usermod -aG docker jenkins
sudo systemctl restart jenkins
Phase 4: Monitoring
Create another EC2 instance: T3.medium because prometheus requires 4 CPU and 20 gb Attach an Elastic IP to this instance
-
Install Prometheus and Grafana:
Set up Prometheus and Grafana to monitor your application.
Installing Prometheus:
First, create a dedicated Linux user for Prometheus and download Prometheus:
sudo useradd --system --no-create-home --shell /bin/false prometheus wget https://github.com/prometheus/prometheus/releases/download/v2.47.1/prometheus-2.47.1.linux-amd64.tar.gz
Extract Prometheus files, move them, and create directories:
tar -xvf prometheus-2.47.1.linux-amd64.tar.gz cd prometheus-2.47.1.linux-amd64/ sudo mkdir -p /data /etc/prometheus sudo mv prometheus promtool /usr/local/bin/ sudo mv consoles/ console_libraries/ /etc/prometheus/ sudo mv prometheus.yml /etc/prometheus/prometheus.ymlSet ownership for directories:
sudo chown -R prometheus:prometheus /etc/prometheus/ /data/
Create a systemd unit configuration file for Prometheus:
sudo nano /etc/systemd/system/prometheus.service
Add the following content to the
prometheus.servicefile:[Unit] Description=Prometheus Wants=network-online.target After=network-online.target StartLimitIntervalSec=500 StartLimitBurst=5 [Service] User=prometheus Group=prometheus Type=simple Restart=on-failure RestartSec=5s ExecStart=/usr/local/bin/prometheus \ --config.file=/etc/prometheus/prometheus.yml \ --storage.tsdb.path=/data \ --web.console.templates=/etc/prometheus/consoles \ --web.console.libraries=/etc/prometheus/console_libraries \ --web.listen-address=0.0.0.0:9090 \ --web.enable-lifecycle [Install] WantedBy=multi-user.targetHere's a brief explanation of the key parts in this
prometheus.servicefile:-
UserandGroupspecify the Linux user and group under which Prometheus will run. -
ExecStartis where you specify the Prometheus binary path, the location of the configuration file (prometheus.yml), the storage directory, and other settings. -
web.listen-addressconfigures Prometheus to listen on all network interfaces on port 9090. -
web.enable-lifecycleallows for management of Prometheus through API calls.
Enable and start Prometheus:
sudo systemctl enable prometheus sudo systemctl start prometheusVerify Prometheus's status:
sudo systemctl status prometheus
You can access Prometheus in a web browser using your server's IP and port 9090:
http://<your-server-ip>:9090Make sure to add this port in the security group of this instanceInstalling Node Exporter:
Create a system user for Node Exporter and download Node Exporter:
sudo useradd --system --no-create-home --shell /bin/false node_exporter wget https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz
Extract Node Exporter files, move the binary, and clean up:
tar -xvf node_exporter-1.6.1.linux-amd64.tar.gz sudo mv node_exporter-1.6.1.linux-amd64/node_exporter /usr/local/bin/ rm -rf node_exporter*Create a systemd unit configuration file for Node Exporter:
sudo nano /etc/systemd/system/node_exporter.service
Add the following content to the
node_exporter.servicefile:[Unit] Description=Node Exporter Wants=network-online.target After=network-online.target StartLimitIntervalSec=500 StartLimitBurst=5 [Service] User=node_exporter Group=node_exporter Type=simple Restart=on-failure RestartSec=5s ExecStart=/usr/local/bin/node_exporter --collector.logind [Install] WantedBy=multi-user.targetReplace
--collector.logindwith any additional flags as needed.Enable and start Node Exporter:
sudo systemctl enable node_exporter sudo systemctl start node_exporterVerify the Node Exporter's status:
sudo systemctl status node_exporter
You can access Node_Exporter metrics in Prometheus. Node-exporter default port is 9100 Make sure to add this port in the security group. then you wiil alow to get access in your browser
-
-
Configure Prometheus Plugin Integration:
Integrate Jenkins with Prometheus to monitor the CI/CD pipeline.
Prometheus Configuration:
To configure Prometheus to scrape metrics from Node Exporter and Jenkins, you need to modify the
prometheus.ymlfile. Here is an exampleprometheus.ymlconfiguration for your setup:global: scrape_interval: 15s scrape_configs: - job_name: 'node_exporter' static_configs: - targets: ['localhost:9100'] - job_name: 'jenkins' metrics_path: '/prometheus' static_configs: - targets: ['<your-jenkins-ip>:<your-jenkins-port>']
Make sure to replace
<your-jenkins-ip>and<your-jenkins-port>with the appropriate values for your Jenkins setup.Check the validity of the configuration file:
promtool check config /etc/prometheus/prometheus.yml
Reload the Prometheus configuration without restarting:
curl -X POST http://localhost:9090/-/reload
You can access Prometheus targets at:
http://<your-prometheus-ip>:9090/targetsMake sure to add this port in the security group.Your prometheus without all this metrics. you will add them later.
####Grafana
Install Grafana on Ubuntu 22.04 and Set it up to Work with Prometheus
Step 1: Install Dependencies:
First, ensure that all necessary dependencies are installed:
sudo apt-get update
sudo apt-get install -y apt-transport-https software-properties-commonStep 2: Add the GPG Key:
Add the GPG key for Grafana:
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -Step 3: Add Grafana Repository:
Add the repository for Grafana stable releases:
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.listStep 4: Update and Install Grafana:
Update the package list and install Grafana:
sudo apt-get update
sudo apt-get -y install grafanaStep 5: Enable and Start Grafana Service:
To automatically start Grafana after a reboot, enable the service:
sudo systemctl enable grafana-serverThen, start Grafana:
sudo systemctl start grafana-serverStep 6: Check Grafana Status:
Verify the status of the Grafana service to ensure it's running correctly:
sudo systemctl status grafana-serverStep 7: Access Grafana Web Interface:
Open a web browser and navigate to Grafana using your server's IP address. The default port for Grafana is 3000. For example:
http://<your-server-ip>:3000
add this port in the security group
You'll be prompted to log in to Grafana. The default username is "admin," and the default password is also "admin."
Step 8: Change the Default Password:
When you log in for the first time, Grafana will prompt you to change the default password for security reasons. Follow the prompts to set a new password.
Step 9: Add Prometheus Data Source:
To visualize metrics, you need to add a data source. Follow these steps:
-
Click on the gear icon (⚙️) in the left sidebar to open the "Configuration" menu.
-
Select "Data Sources."
-
Click on the "Add data source" button.
-
Choose "Prometheus" as the data source type.
-
In the "HTTP" section:
- Set the "URL" to
http://localhost:9090(assuming Prometheus is running on the same server). - Click the "Save & Test" button to ensure the data source is working.
- Set the "URL" to
Step 10: Import a Dashboard:
To make it easier to view metrics, you can import a pre-configured dashboard. Follow these steps:
-
Click on the "+" (plus) icon in the left sidebar to open the "Create" menu.
-
Select "Dashboard."
-
Click on the "Import" dashboard option.
-
Enter the dashboard code you want to import (e.g., code 1860).
-
Click the "Load" button.
-
Select the data source you added (Prometheus) from the dropdown.
-
Click on the "Import" button.
You should now have a Grafana dashboard set up to visualize metrics from Prometheus.
Grafana is a powerful tool for creating visualizations and dashboards, and you can further customize it to suit your specific monitoring needs.
That's it! You've successfully installed and set up Grafana to work with Prometheus for monitoring and visualization.
Graphana dasboard for node-exporter
- Configure Prometheus Plugin Integration:
- Integrate Jenkins with Prometheus to monitor the CI/CD pipeline. install promotheus plugin in jenkis go to system to set up the system (paht: prometheus) click apply and save
- graphana dasboard for jenkins should be like this
Phase 5: Notification
-
Implement Notification Services:
- Set up email notifications in Jenkins or other notification mechanisms.
- create application password in google got to security and search app password follow instruction
- create an credential in jenkins for you gmail account username: yourmail password: app code
- configure Extended E-mail Notification SMTP server: smtp.gmail.com SMTP port: 465 adnvanced: select creendential and use SSL default content type: html
- configure E-mail Notification SMTP server: smtp.gmail.com adnvanced: Use SMTP Auth and fill up creendential use SSL smtp port 465 you can test configuration click save and apply
- Set up email notifications in Jenkins or other notification mechanisms.
-
Add Notification Stage in pipeline: your pipeline should be like this
pipeline {
agent any
tools {
jdk 'jdk17'
nodejs 'node16'
}
environment {
SCANNER_HOME = tool 'sonar-scanner'
}
stages {
stage('clean workspace') {
steps {
cleanWs()
}
}
stage('Checkout from Git') {
steps {
git branch: 'main', url: 'https://github.com/N4si/DevSecOps-Project.git'
}
}
stage("Sonarqube Analysis") {
steps {
withSonarQubeEnv('sonar-server') {
sh '''$SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=Netflix \
-Dsonar.projectKey=Netflix'''
}
}
}
stage("quality gate") {
steps {
script {
waitForQualityGate abortPipeline: false, credentialsId: 'sonar'
}
}
}
stage('Install Dependencies') {
steps {
sh "npm install"
}
}
stage('OWASP FS SCAN') {
steps {
dependencyCheck additionalArguments: '--scan ./ --disableYarnAudit --disableNodeAudit', odcInstallation: 'DP-Check'
dependencyCheckPublisher pattern: '**/dependency-check-report.xml'
}
}
stage('TRIVY FS SCAN') {
steps {
sh "trivy fs . > trivyfs.txt"
}
}
stage("Docker Build & Push"){
steps{
script{
withDockerRegistry(credentialsId: 'dockerhub', toolName: 'docker'){
sh "docker build --build-arg TMDB_V3_API_KEY=2634ec2145f37381b6d820b2c35e0674 -t netflix ."
sh "docker tag netflix fleury12/netflix:latest "
sh "docker push fleury12/netflix:latest "
}
}
}
}
stage("TRIVY"){
steps{
sh "trivy image fleury12/netflix:latest > trivyimage.txt"
}
}
stage('Deploy to container'){
steps{
sh 'docker run -d --name netflix -p 8081:80 fleury12/netflix:latest'
}
}
}
post {
always {
emailext(
attachLog: true,
subject: "Pipeline ${currentBuild.currentResult}: ${env.JOB_NAME} #${env.BUILD_NUMBER}",
body: "Le pipeline est terminé avec le résultat: ${currentBuild.currentResult}",
to: "[email protected]",
attachmentsPattern: 'trivyfs.txt, trivyimage.txt'
)
}
}
}
Your pipeline in jenkins
In this phase, you'll set up a Kubernetes cluster with node groups. This will provide a scalable environment to deploy and manage your applications. follow this link to create your EKS IAM role and Node IAM role https://docs.aws.amazon.com/fr_fr/eks/latest/userguide/cluster-iam-role.html https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html
-
create cluster configure name ,IAM ROLE, subnet your cluster is created
-
create nodegroups if your EKS auto mode was active, then the default node have been created The CNI used is not compatible with EC2 machine. then you need to set up for your cluster in norder to be able to create another, you need to add the Amazon VPC CNI This allow your node to have an addressage annd manage network betwenn pods of your nods if it is not activiate, you wont be able to create a nodegroup Select your cluster -> compute ->node groups -> add Create
-
Get access to your cluster in you CLI install aws ClI
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update aws --version
set up the environment
aws eks udate-kubeconfig --name Netflix --region your_cluster_regions
Prometheus is a powerful monitoring and alerting toolkit, and you'll use it to monitor your Kubernetes cluster. Additionally, you'll install the node exporter using Helm to collect metrics from your cluster nodes.
To begin monitoring your Kubernetes cluster, you'll install the Prometheus Node Exporter. This component allows you to collect system-level metrics from your cluster nodes. Here are the steps to install the Node Exporter using Helm:
-
Add the Prometheus Community Helm repository:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
-
Create a Kubernetes namespace for the Node Exporter:
kubectl create namespace prometheus-node-exporter
-
Install the Node Exporter using Helm:
helm install prometheus-node-exporter prometheus-community/prometheus-node-exporter --namespace prometheus-node-exporter
Add a Job to Scrape Metrics on nodeip:9100/metrics in prometheus.yml: Make sure that your added 9100 in the security group of your node
Update your Prometheus configuration (prometheus.yml) to add a new job for scraping metrics from nodeip:9001/metrics. You can do this by adding the following configuration to your prometheus.yml file:
- job_name: 'Netflix'
metrics_path: '/metrics'
static_configs:
- targets: ['node1Ip:9100']
Replace 'your-job-name' with a descriptive name for your job. The static_configs section specifies the targets to scrape metrics from, and in this case, it's set to nodeip:9100.
Don't forget to reload or restart Prometheus to apply these changes to your configuration.
To deploy an application with ArgoCD, you can follow these steps, which I'll outline in Markdown format:
ArgoCD is a continous deployement tools, it allow to deploy automatically your app when a change is mage on your repo.it uses Helm chat or k8s manifest to deploy your app.
-
Install ArgoCD:
You can install ArgoCD on your Kubernetes cluster by following the instructions :
kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.11.2/manifests/install.yaml kubectl patch svc argocd-server -n argocd \ -p '{"spec": {"type": "LoadBalancer"}}' export ARGOCD_SERVER=$(kubectl get svc argocd-server -n argocd -o json | jq --raw-output '.status.loadBalancer.ingress[0].hostname') export ARGOCD_PWD=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d) echo "Argo CD admin password: $ARGOCD_PWD"
copy and paste the ARGOCD_SERVER link in you browser username: admin passw: $ARGOCD_PWD
-
Set Your GitHub Repository as a Source:
After installing ArgoCD, you need to set up your GitHub repository as a source for your application deployment. This typically involves configuring the connection to your repository and defining the source for your ArgoCD application. The specific steps will depend on your setup and requirements.
-
Create an ArgoCD Application:
name: Set the name for your application.destination: Define the destination where your application should be deployed.project: Specify the project the application belongs to.source: Set the source of your application, including the GitHub repository URL, revision, and the path to the application within the repository.syncPolicy: Configure the sync policy, including automatic syncing, pruning, and self-healing.
-
Access your Application
- To Access the app make sure port 30007 is open in your security group of the node and then open a new tab paste your NodeIP:30007, your app should be running.
Phase 7: Cleanup
- Cleanup AWS EC2 Instances:
- Terminate AWS EC2 instances that are no longer needed.





