SlideShare a Scribd company logo
31st Aug 2019
Bangalore Meetup Community
Networking time
Introduce yourself to your neighbors!
All contents © MuleSoft Inc.
Agenda
3
10:30AM - 10:45 AM : Short Introductions
11:15AM - 11:45 PM : Resource creation using Terraform as part of CI CD
11:45AM - 12:15 PM : DataWeave Custom DataFormat
12:15 PM - 12:45PM : Open forum discussion and Q&A
12:45PM - 1:00PM : Wrap up
1:00 PM : Snack Time
All contents © MuleSoft Inc.
Sponsor & Intro
All contents © MuleSoft Inc. 5
• We have prizes to give away!
o Thanks for your positive enthusiasm …You earned it ..
Certification Vouchers for all!
A SHOW OF HANDS:
Who is new to this MeetUp?
Automate AWS resources using Terraform
All contents © MuleSoft Inc.
Agenda
7
• What is Terraform ?
• Why use Terraform ?
• Initial Setup
• Using Terraform in Mulesoft CI/CD
• Demo
• Q&A
All contents © MuleSoft Inc.
What is Terraform ?
“HashiCorp Terraform enables you to safely and predictably create, change, and improve
infrastructure. It is an open source tool that codifies APIs into declarative configuration files
that can be shared amongst team members, treated as code, edited, reviewed, and
versioned.” -
All contents © MuleSoft Inc.
Why Terraform ?
9
• Automate.
• Deployment pipeline Consistent.
• Provisioning
• Easy to Manage AWS Infrastructure.
• Open Source.
All contents © MuleSoft Inc.
Setup
10
These steps are required for the first time your team is on-boarding the terraform via bamboo.
Configure AWS account for bamboo instances
This step is required so bamboo instances can assume roles in the AWS account for the resource management.
Configure role and trust in your AWS
• Login with AWS admin access
• Navigate to IAM → roles and create a role which we will be assumed by bamboo instances. For example, created
role “mulesoft-tf-role” with below configs. Make sure to grant proper access for resources which are going to be
managed by terraform.
Inline Policy :-
{
"Version": “2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:*",
"s3:*",
“dynamodb:*",
"sqs:*"
],
"Resource": "*"
}
]
}
Trust Relationship :-
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"ec2.amazonaws.com",
"ecs-tasks.amazonaws.com"
],
"AWS": [
“arn:aws:iam::238728377438:role/non-prod-
bamboo",
"arn:aws:iam::347637463746:role/prod-bamboo"
]
},
"Action": "sts:AssumeRole" }
]
}
All contents © MuleSoft Inc.
Using Terraform in Mulesoft CI/CD
11
This step is required to setup your mule project repo to deploy AWS resources via terraform.
1. Configure bamboo plan and dependencies
a. Copy the bin folder as is to your project root level from bamboo-plan-templates.
b. Also copy the metaplan, depending on the mule version in use, to bamboo-plan-template. bamboo-plan-template folder
should be a the project root level too.
c. Check the metaplan.groovy to validate the below or make the desired changes
i. enableTerraform = true for enabling terraform jobs and tasks
ii.awsRegion for each environment, where the resources will be created.
2. Terraform IaC configs
a. Create folder named “terraform-template” at the project root level, this is where the terraform plans should be stored.
b. Create “vars.tf” under “terraform-template”, update default values for the below snippet and add it to the file.
All contents © MuleSoft Inc.
Using Terraform in Mulesoft CI/CD Count…
12
# terraform configurations
# aws provider authentication with assume_role
provider "aws" {
assume_role {
role_arn = "${var.role_arn}"
session_name = "${var.session_name}"
external_id = "EXTERNAL_ID"
}
region = “${var.region}"
}
# terraform remote state and locking configurations
terraform {
required_version = "~> 0.11.13"
backend "s3" {
encrypt = true
bucket = “<bucket name>"
region = “<region name>"
key = "<appname>.tfstate"
dynamodb_table = “<dynamodb table name>"
role_arn = "arn:aws:iam::238722377438:role/mule-tf-role"
session_name = "mule-terraform-session"
}
}
All contents © MuleSoft Inc.
Using Terraform in Mulesoft CI/CD Count…
13
# Business Group/ Unit metadata
variable "business_unit" {
default = “<team name>"
description = "The business unit for the team"
}
variable "resource_owner" {
default = “<owner name>"
description = "This is the path of IAM policy"
}
variable "service_name" {
default = “<app name>"
description = "Name of the service using this resource"
}
variable "role_arn" {
default = “<arn url>"
description = "This is an AWS role on the account configured for use by terraform"
}
variable "session_name" {
default = “<session name>"
description = "This is the description of IAM policy"
}
variable "region" {
default = "<region>"
description = "Region where the resources will be created"
}
All contents © MuleSoft Inc.
Using Terraform in Mulesoft CI/CD Count…
14
Now you can add the resources to the {service-name}.tf which are required by the service.
Example of SQS and S3 snippets
# aws resource configurations
# sqs-dlq pair
module "sqs-dlq-pair" {
#source = "../../terraform-iac-modules/modules/aws/sqs"
source = “${location of sqs resource}”
region = "${var.region}"
name = "hi-world-mule-4-sample-${terraform.workspace}"
principal_arn_list = "${list(
“<arn role url>/streamhub-demux"
)}"
environment = "${terraform.workspace}"
service_name = "${var.service_name}"
business_unit = "${var.business_unit}"
resource_owner = "${var.resource_owner}"
sqs_policy_props_principals_dev = "${list(
“<arn url>/streamhub-demux"
)}"
sqs_policy_props_actions = "${list(
"SQS:SendMessage",
"SQS:DeleteMessage"
)}"
}
# s3 bucket
module "s3-bucket-resource" {
source = “${location of s3 resource}”
name = "hi-world-mule-4-sample-${terraform.workspace}"
region = "${var.region}"
environment = "${terraform.workspace}"
service_name = "${var.service_name}"
business_unit = "${var.business_unit}"
resource_owner = "${var.resource_owner}"
}
All contents © MuleSoft Inc.
Using the terraform import command
Add Existing AWS resources
15
$ terraform import [options] ADDRESS ID
All contents © MuleSoft Inc.
Import SQS queues
16
Import using resource
$ terraform import aws_resource.resource_name SQS_queue_url
Eg:
$ terraform import aws_sqs_queue.sqs-q-resource https://sqs.ap-southeast-2.amazonaws.com/767678782327/hi-world-
mule-4-sample-ddev
Import using modules
$ terraform import module.module_name.aws_resource.resource_name SQS_queue_url
Eg:
$ terraform import module.sqs-dlq-pair.aws_sqs_queue.sqs-q-resource https://sqs.ap-southeast-
2.amazonaws.com/767678782327/hi-world-mule-4-sample-ddev
All contents © MuleSoft Inc.
Demo
 Creation of AWS resources
 Import AWS Resources
All contents © MuleSoft Inc.All contents © MuleSoft Inc.
Quiz
15
Winners will receive a gift
Mule DataWeave Format
All contents © MuleSoft Inc.
Custom Data Format’s Steps :
20
In order to create a Custom Data Format we need to create a Module
Define The extension (Define a variable with type Data Format)
 acceptedMimeTypes : The defines the mimeTypes that are going to be handled by this
DataFormat
 reader: References to the reader function
 writer: Reference to the writer function
All contents © MuleSoft Inc.
Custom Data Format’s Steps :
21
In order to create a Custom Data Format we need to create a Module
Write reader function
 The first one the content of the Binary to be read and transform to a Value.
 The second one the encoding to be used to read this content.
 The third one is the configuration settings. The type of this is defined by the
DataFormat implementer and is going to be used to hint the user on what settings are
valid.
 E.g:
fun readFixedWidth(content: Binary, charset: String, settings: SchemaUrlSettings): Any = ???
All contents © MuleSoft Inc.
Custom Data Format’s Steps :
22
In order to create a Custom Data Format we need to create a Module
Write writer function
 The first one is theValue to write and transform it into the Binary
 The second one is the settings The type of this is defined by the DataFormat
implementer and is going to be used to hint the user on what settings are valid.
 E.g:
fun writeFixedWidth(theValue: Any, settings: SchemaUrlSettings & EncodingSettings): Binary
= ???
All contents © MuleSoft Inc.
Custom Data Format’s Steps :
23
In order to create a Custom Data Format we need to create a Module
Register the Extension
 Create a file in src/main/resources/META-INF/dw-extensions.dwl that will contain a
reference to the Module so that DataWeave knows where the extensions are.
[
"org::mule::weave::simplefixedwidth::FixedWidth"
]
All contents © MuleSoft Inc.
Demo
 Deploy and use
Add the module dependency into pom.xml
All contents © MuleSoft Inc.All contents © MuleSoft Inc.
Quiz
15
Winners will receive a gift
Q&A
All contents © MuleSoft Inc.
What’s next
27
• Share:
– Tweet your pictures with the hashtag #BangaloreMuleMeetup
– Share the pics in WhatsApp group
• Let the community know you.. 
– Invite your network to join: https://meetups.mulesoft.com/bangalore/
• Feedback:
– Contact either Rajesh, Gaurav or Pruthvi to suggest topics for next
meetup
– Contact MuleSoft at meetup@mulesoft.com for ways to improve the
program
THANK YOU
Meetup bangalore aug31st2019

More Related Content

What's hot

Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Edureka!
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
Suresh Paulraj
 
SAP TechEd 2013 session Tec118 managing your-environment
SAP TechEd 2013 session Tec118 managing your-environmentSAP TechEd 2013 session Tec118 managing your-environment
SAP TechEd 2013 session Tec118 managing your-environment
Chris Kernaghan
 
Managing Enterprise Hadoop Clusters with Apache Ambari
Managing Enterprise Hadoop Clusters with Apache AmbariManaging Enterprise Hadoop Clusters with Apache Ambari
Managing Enterprise Hadoop Clusters with Apache Ambari
Jayush Luniya
 
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksCIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
ICF CIRCUIT
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK Box
Chef Software, Inc.
 
Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with Chef
Jennifer Davis
 
Apache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOXApache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOX
Abhishek Mallick
 
Understand Chef
Understand ChefUnderstand Chef
Understand Chef
devopsjourney
 
Apache Ambari BOF - Overview - Hadoop Summit 2013
Apache Ambari BOF - Overview - Hadoop Summit 2013Apache Ambari BOF - Overview - Hadoop Summit 2013
Apache Ambari BOF - Overview - Hadoop Summit 2013
Hortonworks
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015
Jennifer Davis
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen Summit
Jennifer Davis
 
Performance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & Webdriver
BlazeMeter
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )
Pravin Mishra
 
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...
Amazon Web Services
 
Apache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
Apache Ambari: Simplified Hadoop Cluster Operation & TroubleshootingApache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
Apache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
Jayush Luniya
 
The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)
Venugopal Gummadala
 
Web api scalability and performance
Web api scalability and performanceWeb api scalability and performance
Web api scalability and performance
Himanshu Desai
 
Discover.hdp2.2.ambari.final[1]
Discover.hdp2.2.ambari.final[1]Discover.hdp2.2.ambari.final[1]
Discover.hdp2.2.ambari.final[1]
Hortonworks
 
Managing your Hadoop Clusters with Apache Ambari
Managing your Hadoop Clusters with Apache AmbariManaging your Hadoop Clusters with Apache Ambari
Managing your Hadoop Clusters with Apache Ambari
DataWorks Summit
 

What's hot (20)

Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
SAP TechEd 2013 session Tec118 managing your-environment
SAP TechEd 2013 session Tec118 managing your-environmentSAP TechEd 2013 session Tec118 managing your-environment
SAP TechEd 2013 session Tec118 managing your-environment
 
Managing Enterprise Hadoop Clusters with Apache Ambari
Managing Enterprise Hadoop Clusters with Apache AmbariManaging Enterprise Hadoop Clusters with Apache Ambari
Managing Enterprise Hadoop Clusters with Apache Ambari
 
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef CookbooksCIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK Box
 
Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with Chef
 
Apache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOXApache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOX
 
Understand Chef
Understand ChefUnderstand Chef
Understand Chef
 
Apache Ambari BOF - Overview - Hadoop Summit 2013
Apache Ambari BOF - Overview - Hadoop Summit 2013Apache Ambari BOF - Overview - Hadoop Summit 2013
Apache Ambari BOF - Overview - Hadoop Summit 2013
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen Summit
 
Performance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & Webdriver
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )
 
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...
 
Apache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
Apache Ambari: Simplified Hadoop Cluster Operation & TroubleshootingApache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
Apache Ambari: Simplified Hadoop Cluster Operation & Troubleshooting
 
The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)The secret life of a dispatcher (Adobe CQ AEM)
The secret life of a dispatcher (Adobe CQ AEM)
 
Web api scalability and performance
Web api scalability and performanceWeb api scalability and performance
Web api scalability and performance
 
Discover.hdp2.2.ambari.final[1]
Discover.hdp2.2.ambari.final[1]Discover.hdp2.2.ambari.final[1]
Discover.hdp2.2.ambari.final[1]
 
Managing your Hadoop Clusters with Apache Ambari
Managing your Hadoop Clusters with Apache AmbariManaging your Hadoop Clusters with Apache Ambari
Managing your Hadoop Clusters with Apache Ambari
 

Similar to Meetup bangalore aug31st2019

Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
Aprovisionamiento multi-proveedor con Terraform  - Plain Concepts DevOps dayAprovisionamiento multi-proveedor con Terraform  - Plain Concepts DevOps day
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
Plain Concepts
 
Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly - Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly -
Giulio Vian
 
Debasihish da final.ppt
Debasihish da final.pptDebasihish da final.ppt
Debasihish da final.ppt
Kalkey
 
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
NETWAYS
 
Terraform Cosmos DB
Terraform Cosmos DBTerraform Cosmos DB
Terraform Cosmos DB
Moisés Elías Araya
 
Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly -Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly -
Giulio Vian
 
Final terraform
Final terraformFinal terraform
Final terraform
Gourav Varma
 
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
Amazon Web Services
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
AWS Chicago
 
TIAD : Automating the modern datacenter
TIAD : Automating the modern datacenterTIAD : Automating the modern datacenter
TIAD : Automating the modern datacenter
The Incredible Automation Day
 
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
Chef
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Amazon Web Services
 
AWS CloudFormation macros: Coding best practices - MAD201 - New York AWS Summit
AWS CloudFormation macros: Coding best practices - MAD201 - New York AWS SummitAWS CloudFormation macros: Coding best practices - MAD201 - New York AWS Summit
AWS CloudFormation macros: Coding best practices - MAD201 - New York AWS Summit
Amazon Web Services
 
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLONPaul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
Outlyer
 
Infrastructure as code terraformujeme cloud
Infrastructure as code   terraformujeme cloudInfrastructure as code   terraformujeme cloud
Infrastructure as code terraformujeme cloud
ViliamPucik
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP Developers
Jeremy Lindblom
 
Case Study: Using Terraform and Packer to deploy go applications to AWS
Case Study: Using Terraform and Packer to deploy go applications to AWSCase Study: Using Terraform and Packer to deploy go applications to AWS
Case Study: Using Terraform and Packer to deploy go applications to AWS
Patrick Bolduan
 
Integrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteIntegrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code Suite
Atlassian
 
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackBuilding a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStack
ke4qqq
 
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
Amazon Web Services
 

Similar to Meetup bangalore aug31st2019 (20)

Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
Aprovisionamiento multi-proveedor con Terraform  - Plain Concepts DevOps dayAprovisionamiento multi-proveedor con Terraform  - Plain Concepts DevOps day
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
 
Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly - Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly -
 
Debasihish da final.ppt
Debasihish da final.pptDebasihish da final.ppt
Debasihish da final.ppt
 
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
 
Terraform Cosmos DB
Terraform Cosmos DBTerraform Cosmos DB
Terraform Cosmos DB
 
Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly -Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly -
 
Final terraform
Final terraformFinal terraform
Final terraform
 
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
Running Serverless at The Edge (CTD302) - AWS re:Invent 2018
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 
TIAD : Automating the modern datacenter
TIAD : Automating the modern datacenterTIAD : Automating the modern datacenter
TIAD : Automating the modern datacenter
 
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
AWS Presents: Infrastructure as Code on AWS - ChefConf 2015
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
 
AWS CloudFormation macros: Coding best practices - MAD201 - New York AWS Summit
AWS CloudFormation macros: Coding best practices - MAD201 - New York AWS SummitAWS CloudFormation macros: Coding best practices - MAD201 - New York AWS Summit
AWS CloudFormation macros: Coding best practices - MAD201 - New York AWS Summit
 
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLONPaul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
Paul Angus (ShapeBlue) - Push infrastructure with Ansible #DOXLON
 
Infrastructure as code terraformujeme cloud
Infrastructure as code   terraformujeme cloudInfrastructure as code   terraformujeme cloud
Infrastructure as code terraformujeme cloud
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP Developers
 
Case Study: Using Terraform and Packer to deploy go applications to AWS
Case Study: Using Terraform and Packer to deploy go applications to AWSCase Study: Using Terraform and Packer to deploy go applications to AWS
Case Study: Using Terraform and Packer to deploy go applications to AWS
 
Integrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code SuiteIntegrating Jira Software Cloud With the AWS Code Suite
Integrating Jira Software Cloud With the AWS Code Suite
 
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackBuilding a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStack
 
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
(APP313) NEW LAUNCH: Amazon EC2 Container Service in Action | AWS re:Invent 2014
 

More from D.Rajesh Kumar

Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0
D.Rajesh Kumar
 
Meetup bangalore-sept5th 2020 (1)
Meetup bangalore-sept5th 2020 (1)Meetup bangalore-sept5th 2020 (1)
Meetup bangalore-sept5th 2020 (1)
D.Rajesh Kumar
 
Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020
D.Rajesh Kumar
 
Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10
D.Rajesh Kumar
 
Meetup bangalore june29th2019
Meetup bangalore june29th2019Meetup bangalore june29th2019
Meetup bangalore june29th2019
D.Rajesh Kumar
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangalore
D.Rajesh Kumar
 
Meetup_Bangalore_Rajesh
Meetup_Bangalore_RajeshMeetup_Bangalore_Rajesh
Meetup_Bangalore_Rajesh
D.Rajesh Kumar
 
Calico and container
Calico and containerCalico and container
Calico and container
D.Rajesh Kumar
 
Calico docker+ipam
Calico docker+ipamCalico docker+ipam
Calico docker+ipam
D.Rajesh Kumar
 
Calico architecture
Calico architectureCalico architecture
Calico architecture
D.Rajesh Kumar
 
Calico to secure host interfaces
Calico to secure host interfacesCalico to secure host interfaces
Calico to secure host interfaces
D.Rajesh Kumar
 
Calico and how interprets neutron api
Calico and how interprets neutron apiCalico and how interprets neutron api
Calico and how interprets neutron api
D.Rajesh Kumar
 
Calico with open stack and chef
Calico with open stack and chefCalico with open stack and chef
Calico with open stack and chef
D.Rajesh Kumar
 
Calico with open stack
Calico with open stackCalico with open stack
Calico with open stack
D.Rajesh Kumar
 
Calico with docker
Calico with dockerCalico with docker
Calico with docker
D.Rajesh Kumar
 
Object Store in Mule
Object Store in MuleObject Store in Mule
Object Store in Mule
D.Rajesh Kumar
 
Slack connector with in MULE
Slack connector with in MULESlack connector with in MULE
Slack connector with in MULE
D.Rajesh Kumar
 
MuleSoft Offers a Data Migration Solution
MuleSoft Offers a Data Migration SolutionMuleSoft Offers a Data Migration Solution
MuleSoft Offers a Data Migration Solution
D.Rajesh Kumar
 
Mule version-crowd highlights
Mule version-crowd highlightsMule version-crowd highlights
Mule version-crowd highlights
D.Rajesh Kumar
 
Mule ctf
Mule  ctfMule  ctf
Mule ctf
D.Rajesh Kumar
 

More from D.Rajesh Kumar (20)

Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0Mule soft meetup_-_finland_september_25th__2020 v2.0
Mule soft meetup_-_finland_september_25th__2020 v2.0
 
Meetup bangalore-sept5th 2020 (1)
Meetup bangalore-sept5th 2020 (1)Meetup bangalore-sept5th 2020 (1)
Meetup bangalore-sept5th 2020 (1)
 
Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020Mule soft meetup_-_finland_july_11th__2020
Mule soft meetup_-_finland_july_11th__2020
 
Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10
 
Meetup bangalore june29th2019
Meetup bangalore june29th2019Meetup bangalore june29th2019
Meetup bangalore june29th2019
 
mulesoft meetup @ bangalore
mulesoft meetup @ bangaloremulesoft meetup @ bangalore
mulesoft meetup @ bangalore
 
Meetup_Bangalore_Rajesh
Meetup_Bangalore_RajeshMeetup_Bangalore_Rajesh
Meetup_Bangalore_Rajesh
 
Calico and container
Calico and containerCalico and container
Calico and container
 
Calico docker+ipam
Calico docker+ipamCalico docker+ipam
Calico docker+ipam
 
Calico architecture
Calico architectureCalico architecture
Calico architecture
 
Calico to secure host interfaces
Calico to secure host interfacesCalico to secure host interfaces
Calico to secure host interfaces
 
Calico and how interprets neutron api
Calico and how interprets neutron apiCalico and how interprets neutron api
Calico and how interprets neutron api
 
Calico with open stack and chef
Calico with open stack and chefCalico with open stack and chef
Calico with open stack and chef
 
Calico with open stack
Calico with open stackCalico with open stack
Calico with open stack
 
Calico with docker
Calico with dockerCalico with docker
Calico with docker
 
Object Store in Mule
Object Store in MuleObject Store in Mule
Object Store in Mule
 
Slack connector with in MULE
Slack connector with in MULESlack connector with in MULE
Slack connector with in MULE
 
MuleSoft Offers a Data Migration Solution
MuleSoft Offers a Data Migration SolutionMuleSoft Offers a Data Migration Solution
MuleSoft Offers a Data Migration Solution
 
Mule version-crowd highlights
Mule version-crowd highlightsMule version-crowd highlights
Mule version-crowd highlights
 
Mule ctf
Mule  ctfMule  ctf
Mule ctf
 

Recently uploaded

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 

Recently uploaded (20)

DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 

Meetup bangalore aug31st2019

  • 1. 31st Aug 2019 Bangalore Meetup Community
  • 3. All contents © MuleSoft Inc. Agenda 3 10:30AM - 10:45 AM : Short Introductions 11:15AM - 11:45 PM : Resource creation using Terraform as part of CI CD 11:45AM - 12:15 PM : DataWeave Custom DataFormat 12:15 PM - 12:45PM : Open forum discussion and Q&A 12:45PM - 1:00PM : Wrap up 1:00 PM : Snack Time
  • 4. All contents © MuleSoft Inc. Sponsor & Intro
  • 5. All contents © MuleSoft Inc. 5 • We have prizes to give away! o Thanks for your positive enthusiasm …You earned it .. Certification Vouchers for all! A SHOW OF HANDS: Who is new to this MeetUp?
  • 6. Automate AWS resources using Terraform
  • 7. All contents © MuleSoft Inc. Agenda 7 • What is Terraform ? • Why use Terraform ? • Initial Setup • Using Terraform in Mulesoft CI/CD • Demo • Q&A
  • 8. All contents © MuleSoft Inc. What is Terraform ? “HashiCorp Terraform enables you to safely and predictably create, change, and improve infrastructure. It is an open source tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.” -
  • 9. All contents © MuleSoft Inc. Why Terraform ? 9 • Automate. • Deployment pipeline Consistent. • Provisioning • Easy to Manage AWS Infrastructure. • Open Source.
  • 10. All contents © MuleSoft Inc. Setup 10 These steps are required for the first time your team is on-boarding the terraform via bamboo. Configure AWS account for bamboo instances This step is required so bamboo instances can assume roles in the AWS account for the resource management. Configure role and trust in your AWS • Login with AWS admin access • Navigate to IAM → roles and create a role which we will be assumed by bamboo instances. For example, created role “mulesoft-tf-role” with below configs. Make sure to grant proper access for resources which are going to be managed by terraform. Inline Policy :- { "Version": “2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "iam:*", "s3:*", “dynamodb:*", "sqs:*" ], "Resource": "*" } ] } Trust Relationship :- { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "ec2.amazonaws.com", "ecs-tasks.amazonaws.com" ], "AWS": [ “arn:aws:iam::238728377438:role/non-prod- bamboo", "arn:aws:iam::347637463746:role/prod-bamboo" ] }, "Action": "sts:AssumeRole" } ] }
  • 11. All contents © MuleSoft Inc. Using Terraform in Mulesoft CI/CD 11 This step is required to setup your mule project repo to deploy AWS resources via terraform. 1. Configure bamboo plan and dependencies a. Copy the bin folder as is to your project root level from bamboo-plan-templates. b. Also copy the metaplan, depending on the mule version in use, to bamboo-plan-template. bamboo-plan-template folder should be a the project root level too. c. Check the metaplan.groovy to validate the below or make the desired changes i. enableTerraform = true for enabling terraform jobs and tasks ii.awsRegion for each environment, where the resources will be created. 2. Terraform IaC configs a. Create folder named “terraform-template” at the project root level, this is where the terraform plans should be stored. b. Create “vars.tf” under “terraform-template”, update default values for the below snippet and add it to the file.
  • 12. All contents © MuleSoft Inc. Using Terraform in Mulesoft CI/CD Count… 12 # terraform configurations # aws provider authentication with assume_role provider "aws" { assume_role { role_arn = "${var.role_arn}" session_name = "${var.session_name}" external_id = "EXTERNAL_ID" } region = “${var.region}" } # terraform remote state and locking configurations terraform { required_version = "~> 0.11.13" backend "s3" { encrypt = true bucket = “<bucket name>" region = “<region name>" key = "<appname>.tfstate" dynamodb_table = “<dynamodb table name>" role_arn = "arn:aws:iam::238722377438:role/mule-tf-role" session_name = "mule-terraform-session" } }
  • 13. All contents © MuleSoft Inc. Using Terraform in Mulesoft CI/CD Count… 13 # Business Group/ Unit metadata variable "business_unit" { default = “<team name>" description = "The business unit for the team" } variable "resource_owner" { default = “<owner name>" description = "This is the path of IAM policy" } variable "service_name" { default = “<app name>" description = "Name of the service using this resource" } variable "role_arn" { default = “<arn url>" description = "This is an AWS role on the account configured for use by terraform" } variable "session_name" { default = “<session name>" description = "This is the description of IAM policy" } variable "region" { default = "<region>" description = "Region where the resources will be created" }
  • 14. All contents © MuleSoft Inc. Using Terraform in Mulesoft CI/CD Count… 14 Now you can add the resources to the {service-name}.tf which are required by the service. Example of SQS and S3 snippets # aws resource configurations # sqs-dlq pair module "sqs-dlq-pair" { #source = "../../terraform-iac-modules/modules/aws/sqs" source = “${location of sqs resource}” region = "${var.region}" name = "hi-world-mule-4-sample-${terraform.workspace}" principal_arn_list = "${list( “<arn role url>/streamhub-demux" )}" environment = "${terraform.workspace}" service_name = "${var.service_name}" business_unit = "${var.business_unit}" resource_owner = "${var.resource_owner}" sqs_policy_props_principals_dev = "${list( “<arn url>/streamhub-demux" )}" sqs_policy_props_actions = "${list( "SQS:SendMessage", "SQS:DeleteMessage" )}" } # s3 bucket module "s3-bucket-resource" { source = “${location of s3 resource}” name = "hi-world-mule-4-sample-${terraform.workspace}" region = "${var.region}" environment = "${terraform.workspace}" service_name = "${var.service_name}" business_unit = "${var.business_unit}" resource_owner = "${var.resource_owner}" }
  • 15. All contents © MuleSoft Inc. Using the terraform import command Add Existing AWS resources 15 $ terraform import [options] ADDRESS ID
  • 16. All contents © MuleSoft Inc. Import SQS queues 16 Import using resource $ terraform import aws_resource.resource_name SQS_queue_url Eg: $ terraform import aws_sqs_queue.sqs-q-resource https://sqs.ap-southeast-2.amazonaws.com/767678782327/hi-world- mule-4-sample-ddev Import using modules $ terraform import module.module_name.aws_resource.resource_name SQS_queue_url Eg: $ terraform import module.sqs-dlq-pair.aws_sqs_queue.sqs-q-resource https://sqs.ap-southeast- 2.amazonaws.com/767678782327/hi-world-mule-4-sample-ddev
  • 17. All contents © MuleSoft Inc. Demo  Creation of AWS resources  Import AWS Resources
  • 18. All contents © MuleSoft Inc.All contents © MuleSoft Inc. Quiz 15 Winners will receive a gift
  • 20. All contents © MuleSoft Inc. Custom Data Format’s Steps : 20 In order to create a Custom Data Format we need to create a Module Define The extension (Define a variable with type Data Format)  acceptedMimeTypes : The defines the mimeTypes that are going to be handled by this DataFormat  reader: References to the reader function  writer: Reference to the writer function
  • 21. All contents © MuleSoft Inc. Custom Data Format’s Steps : 21 In order to create a Custom Data Format we need to create a Module Write reader function  The first one the content of the Binary to be read and transform to a Value.  The second one the encoding to be used to read this content.  The third one is the configuration settings. The type of this is defined by the DataFormat implementer and is going to be used to hint the user on what settings are valid.  E.g: fun readFixedWidth(content: Binary, charset: String, settings: SchemaUrlSettings): Any = ???
  • 22. All contents © MuleSoft Inc. Custom Data Format’s Steps : 22 In order to create a Custom Data Format we need to create a Module Write writer function  The first one is theValue to write and transform it into the Binary  The second one is the settings The type of this is defined by the DataFormat implementer and is going to be used to hint the user on what settings are valid.  E.g: fun writeFixedWidth(theValue: Any, settings: SchemaUrlSettings & EncodingSettings): Binary = ???
  • 23. All contents © MuleSoft Inc. Custom Data Format’s Steps : 23 In order to create a Custom Data Format we need to create a Module Register the Extension  Create a file in src/main/resources/META-INF/dw-extensions.dwl that will contain a reference to the Module so that DataWeave knows where the extensions are. [ "org::mule::weave::simplefixedwidth::FixedWidth" ]
  • 24. All contents © MuleSoft Inc. Demo  Deploy and use Add the module dependency into pom.xml
  • 25. All contents © MuleSoft Inc.All contents © MuleSoft Inc. Quiz 15 Winners will receive a gift
  • 26. Q&A
  • 27. All contents © MuleSoft Inc. What’s next 27 • Share: – Tweet your pictures with the hashtag #BangaloreMuleMeetup – Share the pics in WhatsApp group • Let the community know you..  – Invite your network to join: https://meetups.mulesoft.com/bangalore/ • Feedback: – Contact either Rajesh, Gaurav or Pruthvi to suggest topics for next meetup – Contact MuleSoft at meetup@mulesoft.com for ways to improve the program