Presentation by Wojciech from NetworkedAssets for the Atlassian User Group Lower Silesia on April 20th, 2016 about how to automatically manage development environments with simple Jira tickets and Saltstack.
2. IT Automation
20.04.2016
IT Process
Automation
Cloud OrchestrationInfrastructure
Provisioning
Automation scripts
Application Release
Automation
Network Automation
Business Process
Automation
Workload automation
Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
3. IT Automation
20.04.2016
IT Process
Automation
Cloud OrchestrationInfrastructure
Provisioning
Automation scripts
Application Release
Automation
Network Automation
Business Process
Automation
Workload automation
Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
4. Software Configuration Management
• Code describing shape
of configured objects
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
5. Software Configuration Management
• Code describing shape
of configured objects
• Declarative
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
6. Software Configuration Management
• Code describing shape
of configured objects
• Declarative
• Additional abstraction layer
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
7. Software Configuration Management
• Code describing shape
of configured objects
• Declarative
• Additional abstraction layer
• Handles dependencies and execution order
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
8. Software Configuration Management
Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
• Code describing shape
of configured objects
• Declarative
• Additional abstraction layer
• Handles dependencies and execution order
20.04.2016
9. Automation and processes
Let’s assume that at this point:
• Configuration Management solution is implemented
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
10. Automation and processes
Let’s assume that at this point:
• Configuration Management solution is implemented
• Every part of infrastructure is defined by code
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
11. Automation and processes
Let’s assume that at this point:
• Configuration Management solution is implemented
• Every part of infrastructure is defined by code
• Code is stored within repository
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
12. Automation and processes
Let’s assume that at this point:
• Configuration Management solution is implemented
• Every part of infrastructure is defined by code
• Code is stored within repository
• As we push new code, our infrastructure changes
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
13. Automation and processes
Let’s assume that at this point:
• Configuration Management solution is implemented
• Every part of infrastructure is defined by code
• Code is stored within repository
• As we push new code, our infrastructure changes
Can we automate it even further?
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
14. Let me tell you a story
a developer goes to a sysadmin…
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
15. Let me tell you a story
a developer goes to a sysadmin…
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
16. Nope. It never goes this way
Here goes true version of the story…
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
17. Nope. It never goes this way
Here goes true version of the story…
Since we’ll need a ticket anyway… let’s make the most of it.
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
18. JIRA webhooks
• Simple interface to interact with
other applications
{
"transition": {
"workflowId": 10401,
"workflowName": "SI: Cloud orchestration workflow",
"transitionId": 11,
"transitionName": "Provision",
"from_status": "Ready to build",
"to_status": "Provisioning"
},
"comment": "",
"user": {
"self": "http://ww-dev-01.networkedassets.local/jira/rest/api/2/user?username=ww",
"name": "ww",
"key": "ww",
"emailAddress": "wwrobewski@networkedassets.org",
"displayName": "ww",
"active": true,
"timeZone": "UTC"
},
"issue": {
"id": "10401",
"self": "http://ww-dev-01.networkedassets.local/jira/rest/api/2/issue/10401",
"key": "SI-9",
"fields": {
"issuetype": {
"self": "http://ww-dev-01.networkedassets.local/jira/rest/api/2/issuetype/10200",
"id": "10200",
"description": "",
"iconUrl": "http://ww-dev-
01.networkedassets.local/jira/secure/viewavatar?size=xsmall&avatarId=10300&avatarType=issuetype",
"name": "Order",
"subtask": false,
"avatarId": 10300
},
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
19. JIRA webhooks
• Simple interface to interact with
other applications
• On execution of mapped action,
sends HTTP POST request
{
"transition": {
"workflowId": 10401,
"workflowName": "SI: Cloud orchestration workflow",
"transitionId": 11,
"transitionName": "Provision",
"from_status": "Ready to build",
"to_status": "Provisioning"
},
"comment": "",
"user": {
"self": "http://ww-dev-01.networkedassets.local/jira/rest/api/2/user?username=ww",
"name": "ww",
"key": "ww",
"emailAddress": "wwrobewski@networkedassets.org",
"displayName": "ww",
"active": true,
"timeZone": "UTC"
},
"issue": {
"id": "10401",
"self": "http://ww-dev-01.networkedassets.local/jira/rest/api/2/issue/10401",
"key": "SI-9",
"fields": {
"issuetype": {
"self": "http://ww-dev-01.networkedassets.local/jira/rest/api/2/issuetype/10200",
"id": "10200",
"description": "",
"iconUrl": "http://ww-dev-
01.networkedassets.local/jira/secure/viewavatar?size=xsmall&avatarId=10300&avatarType=issuetype",
"name": "Order",
"subtask": false,
"avatarId": 10300
},
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
20. Bringing Salt to workflow
one ticket == one environment
• Provisioning and Orchestration
introduced as process stages
• Decommission workflow
• Error handling: negative flow
• Use webhooks to call other
applications APIs
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
21. JIRA + SaltStack
• JIRA and SaltStack are tools made
for whole different purpose
• Operate on different sets of objects
• They won’t understand each other
…unless we provide them a translator.
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
22. Crystalized
the middleman
What it does?
– Collects webhook calls
– Translates objects and data
– Manages jobs
– Validates results
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław
23. Crystalized
the middleman
What it does?
– Collects webhook calls
– Translates objects and data
– Manages jobs
– Validates results
What it is?
– A lightweight application written in python
– Based on flask framework
20.04.2016Automate your development environments with JIRA and Saltstack, Atlassian User Group LS, Wrocław