MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying MuleSoft Application Using GitHub Actions
1. Nashik MuleSoft Meetup Group
Implementing CI/CD pipeline for deploying
MuleSoft Application Using GitHub Actions
27th February 2022
2. Safe Harbour Statement
● Both the speaker and the host are organizing this meet-up in individual capacity only. We are
not representing our companies here.
● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any
responsibility that same solution will work for your business requirements.
● This presentation is not meant for any promotional activities.
2
3. A recording of this meetup will be uploaded to events page within 24 hours.
Questions can be submitted/asked at any time in the Chat/Questions & Answers Tab.
Make it more Interactive!!!
Give us feedback! Rate this meetup session by filling feedback form at the end of the day.
We Love Feedbacks!!! Its Bread & Butter for Meetup.
Housekeeping
3
5. Speaker
5
Jitendra Bafna
Senior Solution Architect
EPAM Systems
⮚ Overall, 14 years of experience in API and Integration Technologies.
⮚ MuleSoft Ambassador and Surat/Nashik MuleSoft Meetup Leader
⮚ Published overall 300+ YouTube Videos and 150+ Articles on MuleSoft
and Anypoint Platform.
⮚ Expertise in setting up MuleSoft platform includes Hybrid
Implementation, CloudHub (Anypoint VPC, VPN and DLB), Customer
Hosted Mule Runtime (Clustering and Server Group).
⮚ Expertise in Application Integration using API Led Connectivity and
Event Driven Architecture.
⮚ Expertise in Integration with various systems like Salesforce, NetSuite
ERP, Snowflake, Databases, SAP,
⮚ Define Integration and migration strategy and roadmap includes
migrating from on premise to CloudHub, migrating to higher version of
Mule Runtime etc.
6. 6
Agenda
● What is CI/CD?
● Mule Maven Plugin
● GitHub Action
● Deploying Application to CloudHub using GitHub Action (Anypoint
Username and Password)
● Deploying Application to CloudHub using GitHub Action (Connected
Apps)
● Trivia Quiz
7. DevOps is a culture which promotes collaboration between Development and IT Operations Team to deploy
code to production faster in an automated & repeatable way.
Benefits of DevOps
● Releases/deployment can be done more frequently and quicker.
● Shorter mean time to repair.
● Cost reduction and reliable deployment.
● Fault isolation.
What is DevOps
8. Continuous Integration is a development practice where developers checked in the code multiple times a day in a shared
repository. Each integration is verified by an automated build and automated unit testing.
Continuous Deployment is the ability to move the changes including features, bug fixes into the production quicker.
Benefits of CI/CD
● Quicker releases
● Smaller code changes
● Faster Mean Time To Resolution (MTTR).
● Improved testability.
● Improved customer satisfaction.
What is CI/CD
9. GitHub Action is CI/CD platform that allows you to automates the build, test and deployment pipeline. GitHub Action
provides capability to create the workflow that build or deploy the application on pull request or push.
GitHub Action
10. Mule Maven Plugin allows you to deploy MuleSoft application to CloudHub, Runtime Fabric Manager or Standalone Mule
Runtime.
Authentication mechanism supported by Mule Maven Plugin
- Anypoint Username and Password
- AuthToken
- ConnectedApps
- Server
Mule Maven Plugin
11. Mule Maven Plugin
Parameter Description Required
cloudHubDeployment Top-level element Yes
uri
Your Anypoint Platform URI
No
If not set, by default this value is set to https://anypoint.mulesoft.com.
muleVersion
The Mule runtime engine version to run in your CloudHub instance.
Yes
Ensure that this value is equal to or higher than the earliest required Mule version of your application.
Example values: 4.3.0, 4.2.2-hf4
username Your CloudHub username
Only when using Anypoint Platform
credentials to login.
password Your CloudHub password
Only when using Anypoint Platform
credentials to login.
applicationName
The name of your application in CloudHub
Yes
This name is part of the domain of your deployed app. For example, naming your application application-1 makes your app’s public domain application-1.cloudhub.io.
artifact
The absolute path of the JAR file to be deployed
No
If not set, the path defaults to the location of the JAR file generated at the package phase.
environment
The CloudHub environment to which you want to deploy
Yes
This value must match any environment configured in your CloudHub account.
<environment>Sandbox</environment>
properties
Top-Level element
No
If you need to set properties for the Mule application you are deploying, you can use the <properties> top-level element:
<properties>
<key>value</key>
</properties>
For example:
<properties>
<http.port>8081</http.port>
</properties>
workers
The number of workers
No
By default, this value is 1.
12. Mule Maven Plugin
workerType
Size of each worker; one of the following values:
No
MICRO (default; 0.1 vCores)
SMALL (0.2 vCores)
MEDIUM (1 vCore )
LARGE (2 vCores)
XLARGE (4 vCores)
XXLARGE (8 vCores)
4XLARGE (16 vCores)
region
Region of worker clouds; one of the following values:
No
us-east-1 (default; US East, N. Virginia)
us-east-2 (US East, Ohio)
us-west-1 (US West, N. California)
us-west-2 (US West, Oregon)
us-gov-west-1 (MuleSoft Government Cloud)
eu-central-1 (EU, Frankfurt)
eu-west-1 (EU, Ireland)
eu-west-2 (EU, London)
ap-southeast-1 (Asia Pacific, Singapore)
ap-southeast-2 (Asia Pacific, Sydney)
ap-northeast-1 (Asia Pacific, Tokyo)
ca-central-1 (Canada, Central)
sa-east-1 (South America, São Paulo)
objectStoreV2
Enables Object Store V2
No
By default, this value is set to match the Runtime Manager configuration of OSv2.
persistentQueues
Enables persistent queues
No
By default, it is set to false.
businessGroup
The Business group path of the deployment
No
Specify the full hierarchical path from the parent organization to the target Business group, for example:
<businessGroup>ParentOrgSubOrg1myBusinessGroup</businessGroup>
businessGroupId
The Business group ID of the deployment
No
Instead of specifying the Business group path, you can specify the Business group ID to deploy your application.
The Business group ID is a mandatory parameter when you have access only to a specific Business group but not to the parent
organization.
This parameter is available in plugin version 3.2.7 and later.
deploymentTimeout
The allowed elapsed time, in milliseconds, between the start of the deployment process and the confirmation that the artifact has been
deployed No
The default value is 1000000.
server
Maven server with Anypoint Platform credentials
No
This is only needed if you want to use your credentials stored in your Maven settings.xml file. This is not the Mule server name.
13. Mule Maven Plugin
skip
When set to true, skips the plugin deployment goal.
No
Its default value is false.
skipDeploymentVerification
When set to true, skips the status verification of your deployed app.
No
Its default value is false.
authToken
Specifies the authorization token to access the platform. You can use this authentication method instead of setting username and password. Only when using an Authorization token to
login.
See Identity Management for a list of supported single sign-on (SSO) types.
connectedAppClientId Specifies the Connected App clientID value.
Only when using Connected Apps credentials
to login.
connectedAppClientSecret Specifies the Connected App secret key.
Only when using Connected Apps credentials
to login.
connectedAppGrantType Specifies the only supported connection type: client_credentials.
Only when using Connected Apps credentials
to login.
applyLatestRuntimePatch
When set to true, the plugin instructs CloudHub to update the worker to the latest available patch for the Mule runtime engine version specified in the
deployment configuration, and then deploys the application.
No
14. The Connected Apps feature provides a framework that enables an external application to integrate with Anypoint
Platform using APIs through OAuth 2.0 and OpenID Connect. Connected apps help users delegate their access without
sharing sensitive credentials or giving full control of their accounts to third parties. Actions taken by connected apps are
audited, and users can also revoke access at any time.
Connected Apps
15. Demonstration 1 - Deploying
Application to CloudHub using
GitHub Action (Anypoint
Username and Password)
16. Demonstration 2 - Deploying
Application to CloudHub using
GitHub Action (Connected Apps)
18. Take a stand !
18
●Nominate yourself for the next meetup speaker and suggest a topic as well.
19. Get ready to WIN a Special Gift from MuleSoft Community
Quiz Time
20. 20
● Share:
○ Tweet using the hashtag #MuleSoftMeetups
○ Invite your network to join: https://meetups.mulesoft.com/nashik/
● Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
What’s next?