SlideShare a Scribd company logo
1 of 25
Download to read offline
Salesforce developer journey in
sfdx release management world
( part II )
1 - Create AWS Instance
> 2 Install Jenkins and sfdx on AWS Instance
> 3 Setup Pipeline 1 : automate testing your code
4 - Setup Pipeline 2 : automate delivery in a sandbox
Badbaxx - Salesforce developer
@84D84XX
“Back to salesforce side”
1 - Overview Lifecycle
2 - Settings dev hub
3 - Install Essentials Tools on aws (sfdx + git)
4 - Create Github Account and project
5 - Setup Variables Jenkins
6 - Create the Job
An Overview of sfdx CI environment
SO
repo
repo
checkout
repo
dev. computer
sfdx push
sfdx pull
git push
git pull
● pipeline 1 : test code
● pipeline 2 : delivery
● pipeline n : ...
Trigger by webhook or CRON
pipeline 1 : basic test on code in our repo
repo
Run apex test
04
● Run apex test (local)
sfdx force:apex:test:run
Push to Scratch Org
03
➔ push data from the repo git
sfdx force:source:push
Create Scratch Org
02
➔ Connect to devhub and create SO
sfdx force:org:create
01
Checkout
repo
SO
SO
2 - Setup Salesforce side
We need now a developer org to continue. You can create one at :
https://developer.salesforce.com/signup
The first step is to activate dev hub option :
From Setup, enter Dev Hub in Quick Find box > select Dev Hub.
To enable Dev Hub, click Enable.
Create jwt token as explain in salesforce
documentation
https://developer.salesforce.com/docs/atlas.en-us.s
fdx_dev.meta/sfdx_dev/sfdx_dev_auth_key_and_c
ert.htm
Create jwt token
2 - Setup Salesforce side
Create a connected app as explained in the
documentation (step 1 to 15)
https://developer.salesforce.com/docs/atlas.en-us.
sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_connecte
d_app.html
Create connected App
2 - Setup Salesforce side
With enabling dev hub in our org, we can now execute sfdx command on it
The Connected app will permit Jenkins to authenticate with the dev hub org and
communicate
The jwt token is the way we will authenticate to the dev hub, via the connected app
2 - Setup Salesforce side
3 - Install git on your aws Instance
Back in puTTY (see part 1) we will install
git with the command :
sudo yum install git
You can verify that it was install with the
command
which git
path where git is install : /usr/bin/git
3 - Install sfdx CLI on your aws instance
You can Install the sfdx cli following salesforce documentation, with the
following command in puTTY :
wget
https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd
64.tar.xz
mkdir sfdx
tar xJf sfdx-linux-amd64.tar.xz -C sfdx --strip-components 1
./sfdx/install
You can get the installation repository with the command : which sfdx
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm
Installing Git and sfdx-cli will permit us to use those software in Jenkins
With sfdx-cli we will use sfdx command to interact with the dev hub and SO
With git, we will checkout our repo on github and get the code we want to test and
push to SO
3 - Installing tools
4 - Set up your github project
https://github.com/baddbaxx/sfdx-project.git
go to your github account
click “+” and import
repository
in clone URL insert :
https://github.com/baddbaxx/
sfdx-project.git
in Name of the new repo.
insert sfdx-project
=> Begin import
5 - Configure Variables
● Credentials
We will add the server.key file (created at the connected app step)
to Jenkins credentials :
Kind Secret file
Scope Global
Id SecretFile
5 - Configure Variables
● Environment variables
Check the environment variable checkbox and add those
4 variables
HUB_ORG_DH : The username for the Dev Hub org, such
as badbaxx@mydomain.com
SFDC_HOST_DH : The login URL of the Salesforce instance
that is hosting the Dev Hub org. The default is
https://login.salesforce.com
CONNECTED_APP_CONSUMER_KEY_DH : The consumer key
that was returned after you created a connected app in
your Dev Hub org.
JWT_CRED_ID_DH : The credentials ID for the private key
file that you stored in the Jenkins Admin Credentials
interface
We will now create the first jenkins job. Select New Item and Freestyle project to star
6 - Create the first job
6 - Create the first job
Select > Pipeline script from SCM
SCM > Git
Repository > Url to your github project
Branch > */master
Script path > Jenkinsfile (in root directory)
Save
and ...
6 - Create the first job
Click buld Now to start the build and play the
script contained in the Jenkins File
fail…
let’s look at the log to debug :
click the little arrow near your build
and select
6 - Create the first job
6 - Create the first job
As you can see, the problem come from a security issue:
you need to approve the signature
=> click on the link Administrators can decide whether to ...
click approve and go back to the job and
click again
6 - Create the first job
you should need to launch again the job 2
time and approve the same way
(See possible trouble next page)
6 - Create the first job
FInally ...
6 - Create the first job
TROUBLE !!!
1- You can only have 3 SO at the same time with a developer edition.
> The job will fail if you already have 3 SO associated with your dev hub
solution : go to your dev hub instance and delete SO
(App Laucher > Active Scratch Org)
2- You can only create a limited number of SO per day. If you reach this point,
you will need to wait 24h to create a new one (and success this pipeline)
6 - Create the first job
you can see all element from your repo deployed
your can see info for all test class (only one here)
Read the log :
Part II Summary
We set up Jenkins on aws to use sfdx-cli
We set up Jenkins on aws to use git
We create a sfdx project in github
We create a basic pipeline to :
- Create a Scratch Org (SO)
- Push Git project in the SO
- launch test class
In last part, we will see :
Deploy the sfdx-project in sandbox with jenkins
Restart Jenkins
sudo service jenkins restart
Annexe
Find something on your aws instance
which <software>
Navigate in file and folder with puTTY
https://www.computerhope.com/issues/chusedos.htm
Update sfdx
sfdx update

More Related Content

What's hot

The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitWeaveworks
 
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA'sUsing Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA'sVincent Claes
 
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...Simplilearn
 
Deploying Elasticsearch and Kibana on Kubernetes with the Elastic Operator / ECK
Deploying Elasticsearch and Kibana on Kubernetes with the Elastic Operator / ECKDeploying Elasticsearch and Kibana on Kubernetes with the Elastic Operator / ECK
Deploying Elasticsearch and Kibana on Kubernetes with the Elastic Operator / ECKImma Valls Bernaus
 
ArgoCD Meetup PPT final.pdf
ArgoCD Meetup PPT final.pdfArgoCD Meetup PPT final.pdf
ArgoCD Meetup PPT final.pdfamanmakwana3
 
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・MobyAkihiro Suda
 

What's hot (7)

The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
 
Docker Networking
Docker NetworkingDocker Networking
Docker Networking
 
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA'sUsing Virtual IO (VIO) on Xilinx ZYNQ FPGA's
Using Virtual IO (VIO) on Xilinx ZYNQ FPGA's
 
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
DevOps Interview Questions Part - 1 | Devops Interview Questions And Answers ...
 
Deploying Elasticsearch and Kibana on Kubernetes with the Elastic Operator / ECK
Deploying Elasticsearch and Kibana on Kubernetes with the Elastic Operator / ECKDeploying Elasticsearch and Kibana on Kubernetes with the Elastic Operator / ECK
Deploying Elasticsearch and Kibana on Kubernetes with the Elastic Operator / ECK
 
ArgoCD Meetup PPT final.pdf
ArgoCD Meetup PPT final.pdfArgoCD Meetup PPT final.pdf
ArgoCD Meetup PPT final.pdf
 
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby
 

Similar to sfdx continuous Integration with Jenkins on aws (Part II)

Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)Bohdan Dovhań
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
SFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateSFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateBohdan Dovhań
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaPantheon
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...Acquia
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntukesavan N B
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
Create Your First Cocoa pods
Create Your First Cocoa podsCreate Your First Cocoa pods
Create Your First Cocoa podsPawan Ramteke
 
Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP applicationJavier López
 
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...Mihai Criveti
 
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsDevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsAmazon Web Services
 
Python Automation With Gauge + Selenium + API + Jenkins
Python Automation With Gauge + Selenium + API + JenkinsPython Automation With Gauge + Selenium + API + Jenkins
Python Automation With Gauge + Selenium + API + JenkinsFagun Priyadarshi
 
Develop FOSS project using Google Code Hosting
Develop FOSS project using Google Code HostingDevelop FOSS project using Google Code Hosting
Develop FOSS project using Google Code HostingNarendra Sisodiya
 
Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015Kurt Madel
 
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...Amazon Web Services
 
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입choi sungwook
 

Similar to sfdx continuous Integration with Jenkins on aws (Part II) (20)

Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)Salesforce Developer eXperience (SFDX)
Salesforce Developer eXperience (SFDX)
 
SFDX Presentation
SFDX PresentationSFDX Presentation
SFDX Presentation
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
SFDX - Spring 2019 Update
SFDX - Spring 2019 UpdateSFDX - Spring 2019 Update
SFDX - Spring 2019 Update
 
CodeShip
CodeShipCodeShip
CodeShip
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon Vienna
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
Fast Paced Drupal 8: Accelerating Development with Composer, Drupal Console a...
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Create Your First Cocoa pods
Create Your First Cocoa podsCreate Your First Cocoa pods
Create Your First Cocoa pods
 
Continous Delivering a PHP application
Continous Delivering a PHP applicationContinous Delivering a PHP application
Continous Delivering a PHP application
 
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
Kubernetes Story - Day 2: Quay.io Container Registry for Publishing, Building...
 
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsDevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
 
Python Automation With Gauge + Selenium + API + Jenkins
Python Automation With Gauge + Selenium + API + JenkinsPython Automation With Gauge + Selenium + API + Jenkins
Python Automation With Gauge + Selenium + API + Jenkins
 
Develop FOSS project using Google Code Hosting
Develop FOSS project using Google Code HostingDevelop FOSS project using Google Code Hosting
Develop FOSS project using Google Code Hosting
 
Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015Atlanta Jenkins Area Meetup October 22nd 2015
Atlanta Jenkins Area Meetup October 22nd 2015
 
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
 
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
 

Recently uploaded

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 

Recently uploaded (20)

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 

sfdx continuous Integration with Jenkins on aws (Part II)

  • 1. Salesforce developer journey in sfdx release management world ( part II ) 1 - Create AWS Instance > 2 Install Jenkins and sfdx on AWS Instance > 3 Setup Pipeline 1 : automate testing your code 4 - Setup Pipeline 2 : automate delivery in a sandbox Badbaxx - Salesforce developer @84D84XX
  • 2. “Back to salesforce side” 1 - Overview Lifecycle 2 - Settings dev hub 3 - Install Essentials Tools on aws (sfdx + git) 4 - Create Github Account and project 5 - Setup Variables Jenkins 6 - Create the Job
  • 3. An Overview of sfdx CI environment SO repo repo checkout repo dev. computer sfdx push sfdx pull git push git pull ● pipeline 1 : test code ● pipeline 2 : delivery ● pipeline n : ... Trigger by webhook or CRON
  • 4. pipeline 1 : basic test on code in our repo repo Run apex test 04 ● Run apex test (local) sfdx force:apex:test:run Push to Scratch Org 03 ➔ push data from the repo git sfdx force:source:push Create Scratch Org 02 ➔ Connect to devhub and create SO sfdx force:org:create 01 Checkout repo SO SO
  • 5. 2 - Setup Salesforce side We need now a developer org to continue. You can create one at : https://developer.salesforce.com/signup The first step is to activate dev hub option : From Setup, enter Dev Hub in Quick Find box > select Dev Hub. To enable Dev Hub, click Enable.
  • 6. Create jwt token as explain in salesforce documentation https://developer.salesforce.com/docs/atlas.en-us.s fdx_dev.meta/sfdx_dev/sfdx_dev_auth_key_and_c ert.htm Create jwt token 2 - Setup Salesforce side
  • 7. Create a connected app as explained in the documentation (step 1 to 15) https://developer.salesforce.com/docs/atlas.en-us. sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_connecte d_app.html Create connected App 2 - Setup Salesforce side
  • 8. With enabling dev hub in our org, we can now execute sfdx command on it The Connected app will permit Jenkins to authenticate with the dev hub org and communicate The jwt token is the way we will authenticate to the dev hub, via the connected app 2 - Setup Salesforce side
  • 9. 3 - Install git on your aws Instance Back in puTTY (see part 1) we will install git with the command : sudo yum install git You can verify that it was install with the command which git path where git is install : /usr/bin/git
  • 10. 3 - Install sfdx CLI on your aws instance You can Install the sfdx cli following salesforce documentation, with the following command in puTTY : wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd 64.tar.xz mkdir sfdx tar xJf sfdx-linux-amd64.tar.xz -C sfdx --strip-components 1 ./sfdx/install You can get the installation repository with the command : which sfdx https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm
  • 11. Installing Git and sfdx-cli will permit us to use those software in Jenkins With sfdx-cli we will use sfdx command to interact with the dev hub and SO With git, we will checkout our repo on github and get the code we want to test and push to SO 3 - Installing tools
  • 12. 4 - Set up your github project https://github.com/baddbaxx/sfdx-project.git go to your github account click “+” and import repository in clone URL insert : https://github.com/baddbaxx/ sfdx-project.git in Name of the new repo. insert sfdx-project => Begin import
  • 13. 5 - Configure Variables ● Credentials We will add the server.key file (created at the connected app step) to Jenkins credentials : Kind Secret file Scope Global Id SecretFile
  • 14. 5 - Configure Variables ● Environment variables Check the environment variable checkbox and add those 4 variables HUB_ORG_DH : The username for the Dev Hub org, such as badbaxx@mydomain.com SFDC_HOST_DH : The login URL of the Salesforce instance that is hosting the Dev Hub org. The default is https://login.salesforce.com CONNECTED_APP_CONSUMER_KEY_DH : The consumer key that was returned after you created a connected app in your Dev Hub org. JWT_CRED_ID_DH : The credentials ID for the private key file that you stored in the Jenkins Admin Credentials interface
  • 15. We will now create the first jenkins job. Select New Item and Freestyle project to star 6 - Create the first job
  • 16. 6 - Create the first job Select > Pipeline script from SCM SCM > Git Repository > Url to your github project Branch > */master Script path > Jenkinsfile (in root directory) Save
  • 17. and ... 6 - Create the first job Click buld Now to start the build and play the script contained in the Jenkins File
  • 18. fail… let’s look at the log to debug : click the little arrow near your build and select 6 - Create the first job
  • 19. 6 - Create the first job As you can see, the problem come from a security issue: you need to approve the signature => click on the link Administrators can decide whether to ...
  • 20. click approve and go back to the job and click again 6 - Create the first job
  • 21. you should need to launch again the job 2 time and approve the same way (See possible trouble next page) 6 - Create the first job FInally ...
  • 22. 6 - Create the first job TROUBLE !!! 1- You can only have 3 SO at the same time with a developer edition. > The job will fail if you already have 3 SO associated with your dev hub solution : go to your dev hub instance and delete SO (App Laucher > Active Scratch Org) 2- You can only create a limited number of SO per day. If you reach this point, you will need to wait 24h to create a new one (and success this pipeline)
  • 23. 6 - Create the first job you can see all element from your repo deployed your can see info for all test class (only one here) Read the log :
  • 24. Part II Summary We set up Jenkins on aws to use sfdx-cli We set up Jenkins on aws to use git We create a sfdx project in github We create a basic pipeline to : - Create a Scratch Org (SO) - Push Git project in the SO - launch test class In last part, we will see : Deploy the sfdx-project in sandbox with jenkins
  • 25. Restart Jenkins sudo service jenkins restart Annexe Find something on your aws instance which <software> Navigate in file and folder with puTTY https://www.computerhope.com/issues/chusedos.htm Update sfdx sfdx update