Why write two add-ons when you can write one and deploy it to both Server and Cloud? Charles Gutjahr from ThinkTilt shares how they brought their Connect add-on to different clouds. Learn how he packaged the add-on in a Docker container to offer it behind the firewall. Hear about the implications for installation, data storage, security, and functionality. By the end of the talk, you'll be able to decide whether Dockerization is the right choice for your add-on.
Charles Gutjahr, Co-Founder and Technology Architect, ThinkTilt
5. What kind of
server plugin?
Separate
codebase
Shared
library
Single
codebase
Separate codebase
Write a new P2 plugin in Java with a
completely new codebase.
JIRA Server
Atlassian Connect
JIRA Cloud
ProForma
Cloud server
ProForma
P2 plugin
6. What kind of
server plugin?
Separate
codebase
Shared
library
Single
codebase
Shared library
Build a new P2 plugin in Java, but
share as much code as possible with
our Cloud add-on.
JIRA Server
Atlassian Connect
JIRA Cloud
ProForma
Cloud server
Shared library
ProForma
P2 plugin
Shared library
7. What kind of
server plugin?
Separate
codebase
Shared
library
Single
codebase
Single codebase
Use the same code for Server and Cloud,
combine a server with a lightweight P2 plugin.
JIRA Server
Atlassian Connect
JIRA Cloud
ProForma
Server
Lightweight P2 plugin
8. Maintenance
Less effort to
add new features
Feature parity
Documentation and
marketing the same
Migration
Reliably migrate
Server to Cloud,
or vice versa
External pages
Serve up pages
outside JIRA
Advantages of a single codebase
9. Maintenance
Less effort to
add new features
Feature parity
Documentation and
marketing the same
Migration
Reliably migrate
Server to Cloud,
or vice versa
External pages
Serve up pages
outside JIRA
Advantages of a single codebase
10. Maintenance
Less effort to
add new features
Feature parity
Documentation and
marketing the same
Migration
Reliably migrate
Server to Cloud,
or vice versa
External pages
Serve up pages
outside JIRA
Advantages of a single codebase
11. Maintenance
Less effort to
add new features
Feature parity
Documentation and
marketing the same
Migration
Reliably migrate
Server to Cloud,
or vice versa
External pages
Serve up pages
outside JIRA
Advantages of a single codebase
12.
13.
14. Popular
Docker is already used
in many large companies
Why Docker?
Great for us too
Docker helps us manage
our own cloud servers
Simple distribution
Customers can install
server in just seconds
15. Popular
Docker is already used
in many large companies
Why Docker?
Great for us too
Docker helps us manage
our own cloud servers
Simple distribution
Customers can install
server in just seconds
16. Popular
Docker is already used
in many large companies
Why Docker?
Great for us too
Docker helps us manage
our own cloud servers
Simple distribution
Customers can install
server in just seconds
21. JSON Web Tokens (JWT)
Authenticates requests for Atlassian Connect add-ons
atlassian-jwt library
Allows a P2 plugin to make JWT requests
P2 plugin
with Docker
P2 plugin
Docker iframe
JWT
Connect JS
22. Atlassian Connect JS
Handles requests from inside an add-on iframe
atlassian-connect-js library
Allows a P2 plugin to receive JavaScript calls from
the pages rendered on the Docker servers
P2 plugin
with Docker
P2 plugin
Docker iframe
JWT
Connect JS
25. REST API
Accessing JIRA from the Docker server
Cloud add-on
to Docker
REST API
App Links
Licensing
OAuth instead of JWT
JWT authenticates calls to JIRA Cloud REST API,
OAuth provides equivalent in JIRA Server
26. REST API
Accessing JIRA from the Docker server
Cloud add-on
to Docker
REST API
App Links
Licensing
OAuth instead of JWT
JWT authenticates calls to JIRA Cloud REST API,
OAuth provides equivalent in JIRA Server
30. Build overview
Docker Hub
Amazon ECS
Public repository
Private repository
ProForma server
Customer hosted
ProForma server
AWS hosted
IDE
Bitbucket
Bitbucket Pipelines
Git repository
31. Push a
checkin to
Bitbucket
Git push
Build & test
Bitbucket Pipelines
builds and tests
the add-on
AWS Deploy
If tagged,
automatically
deploy to AWS
Docker builds
an image with
the binaries
Docker build
Build timeline
Push Docker image
to AWS ECS for
cloud deployment
AWS ECS push
Docker Hub push
Push Docker image
to Docker Hub for
public access
32. Push a
checkin to
Bitbucket
Git push
Build & test
Bitbucket Pipelines
builds and tests
the add-on
AWS Deploy
If tagged,
automatically
deploy to AWS
Docker builds
an image with
the binaries
Docker build
Build timeline
Push Docker image
to AWS ECS for
cloud deployment
AWS ECS push
Docker Hub push
Push Docker image
to Docker Hub for
public access
33. Pipelines
build
Docker build
Push to Hub
Push to AWS
Deploy on AWS
image:
name: thinktilt/proforma-build:latest
pipelines:
tags:
v*: # For version tags, ie v1.0.0
- step:
script:
- sbt docker:publishLocal -Dproject.version=$BITBUCKET_TAG
- docker tag thinktilt/proforma:$BITBUCKET_TAG
thinktilt/proforma:latest
- docker push thinktilt/proforma:latest
- docker push thinktilt/proforma:$BITBUCKET_TAG
- $(aws ecr get-login --region us-west-2)
- docker tag thinktilt/proforma:$BITBUCKET_TAG
$AWS_ECR_URI:$BITBUCKET_TAG
- docker push $AWS_ECR_URI:$BITBUCKET_TAG
deploy-*: # For deployment tags, ie deploy-test
- step:
script:
- aws cloudformation deploy ...
branches:
'**': # All branches
- step:
script:
34. Pipelines
build
Docker build
Push to Hub
Push to AWS
Deploy on AWS
image:
name: thinktilt/proforma-build:latest
pipelines:
tags:
v*: # For version tags, ie v1.0.0
- step:
script:
- sbt docker:publishLocal -Dproject.version=$BITBUCKET_TAG
- docker tag thinktilt/proforma:$BITBUCKET_TAG
thinktilt/proforma:latest
- docker push thinktilt/proforma:latest
- docker push thinktilt/proforma:$BITBUCKET_TAG
- $(aws ecr get-login --region us-west-2)
- docker tag thinktilt/proforma:$BITBUCKET_TAG
$AWS_ECR_URI:$BITBUCKET_TAG
- docker push $AWS_ECR_URI:$BITBUCKET_TAG
deploy-*: # For deployment tags, ie deploy-test
- step:
script:
- aws cloudformation deploy ...
branches:
'**': # All branches
- step:
script:
image:
name: thinktilt/proforma-build:latest
35. Pipelines
build
Docker build
Push to Hub
Push to AWS
Deploy on AWS
image:
name: thinktilt/proforma-build:latest
pipelines:
tags:
v*: # For version tags, ie v1.0.0
- step:
script:
- sbt docker:publishLocal -Dproject.version=$BITBUCKET_TAG
- docker tag thinktilt/proforma:$BITBUCKET_TAG
thinktilt/proforma:latest
- docker push thinktilt/proforma:latest
- docker push thinktilt/proforma:$BITBUCKET_TAG
- $(aws ecr get-login --region us-west-2)
- docker tag thinktilt/proforma:$BITBUCKET_TAG
$AWS_ECR_URI:$BITBUCKET_TAG
- docker push $AWS_ECR_URI:$BITBUCKET_TAG
deploy-*: # For deployment tags, ie deploy-test
- step:
script:
- aws cloudformation deploy ...
branches:
'**': # All branches
- step:
script:
pipelines:
tags:
v*: # For version tags, ie v1.0.0
- step:
script:
- sbt docker:publishLocal -Dproject.version=$BITBUCKET_TAG
36. Pipelines
build
Docker build
Push to Hub
Push to AWS
Deploy on AWS
Pipelines runs on Docker
Can’t build a Docker image inside Docker
External build server
You can run a Docker build server on a VPS
that your Pipelines build connects to
docker: true option in Pipelines
Atlassian now provides a Docker daemon in Pipelines
37. Pipelines
build
Docker build
Push to Hub
Push to AWS
Deploy on AWS
Pipelines runs on Docker
Can’t build a Docker image inside Docker
External build server
You can run a Docker build server on a VPS
that your Pipelines build connects to
docker: true option in Pipelines
Atlassian now provides a Docker daemon in Pipelines
38. Pipelines
build
Docker build
Push to Hub
Push to AWS
Deploy on AWS
Pipelines runs on Docker
Can’t build a Docker image inside Docker
External build server
You can run a Docker build server on a VPS
that your Pipelines build connects to
docker: true option in Pipelines
Atlassian now provides a Docker daemon in Pipelines
39. Pipelines
build
Docker build
Push to Hub
Push to AWS
Deploy on AWS
image:
name: thinktilt/proforma-build:latest
pipelines:
tags:
v*: # For version tags, ie v1.0.0
- step:
script:
- sbt docker:publishLocal -Dproject.version=$BITBUCKET_TAG
- docker tag thinktilt/proforma:$BITBUCKET_TAG
thinktilt/proforma:latest
- docker push thinktilt/proforma:latest
- docker push thinktilt/proforma:$BITBUCKET_TAG
- $(aws ecr get-login --region us-west-2)
- docker tag thinktilt/proforma:$BITBUCKET_TAG
$AWS_ECR_URI:$BITBUCKET_TAG
- docker push $AWS_ECR_URI:$BITBUCKET_TAG
deploy-*: # For deployment tags, ie deploy-test
- step:
script:
- aws cloudformation deploy ...
branches:
'**': # All branches
- step:
script:
- docker tag thinktilt/proforma:$BITBUCKET_TAG
thinktilt/proforma:latest
- docker push thinktilt/proforma:latest
- docker push thinktilt/proforma:$BITBUCKET_TAG
40. Pipelines
build
Docker build
Push to Hub
Push to AWS
Deploy on AWS
image:
name: thinktilt/proforma-build:latest
pipelines:
tags:
v*: # For version tags, ie v1.0.0
- step:
script:
- sbt docker:publishLocal -Dproject.version=$BITBUCKET_TAG
- docker tag thinktilt/proforma:$BITBUCKET_TAG
thinktilt/proforma:latest
- docker push thinktilt/proforma:latest
- docker push thinktilt/proforma:$BITBUCKET_TAG
- $(aws ecr get-login --region us-west-2)
- docker tag thinktilt/proforma:$BITBUCKET_TAG
$AWS_ECR_URI:$BITBUCKET_TAG
- docker push $AWS_ECR_URI:$BITBUCKET_TAG
deploy-*: # For deployment tags, ie deploy-test
- step:
script:
- aws cloudformation deploy ...
branches:
'**': # All branches
- step:
script:
- $(aws ecr get-login --region us-west-2)
- docker tag thinktilt/proforma:$BITBUCKET_TAG
$AWS_ECR_URI:$BITBUCKET_TAG
- docker push $AWS_ECR_URI:$BITBUCKET_TAG
41. Pipelines
build
Docker build
Push to Hub
Push to AWS
Deploy on AWS
image:
name: thinktilt/proforma-build:latest
pipelines:
tags:
v*: # For version tags, ie v1.0.0
- step:
script:
- sbt docker:publishLocal -Dproject.version=$BITBUCKET_TAG
- docker tag thinktilt/proforma:$BITBUCKET_TAG
thinktilt/proforma:latest
- docker push thinktilt/proforma:latest
- docker push thinktilt/proforma:$BITBUCKET_TAG
- $(aws ecr get-login --region us-west-2)
- docker tag thinktilt/proforma:$BITBUCKET_TAG
$AWS_ECR_URI:$BITBUCKET_TAG
- docker push $AWS_ECR_URI:$BITBUCKET_TAG
deploy-*: # For deployment tags, ie deploy-test
- step:
script:
- aws cloudformation deploy ...
branches:
'**': # All branches
- step:
script:
deploy-*: # For deployment tags, ie deploy-test
- step:
script:
- aws cloudformation deploy ...
43. Limited resources
Better to support Server customers with Docker
than not support them at all
External functionality
If some functionality is used outside JIRA,
Docker can provide that behind the firewall
Consistency
Marketing and documentation exactly the same;
Server and Cloud customers can migrate
Good
reasons to
use Docker
44. Limited resources
Better to support Server customers with Docker
than not support them at all
External functionality
If some functionality is used outside JIRA,
Docker can provide that behind the firewall
Consistency
Marketing and documentation exactly the same;
Server and Cloud customers can migrate
Good
reasons to
use Docker
45. Limited resources
Better to support Server customers with Docker
than not support them at all
External functionality
If some functionality is used outside JIRA,
Docker can provide that behind the firewall
Consistency
Marketing and documentation exactly the same;
Server and Cloud customers can migrate
Good
reasons to
use Docker
46. Locked-down networks
Communication between JIRA and Docker
could be blocked in some customer networks
Complexity
Extra steps to install plugin could be off-putting,
especially for trial customers
Risks
of using
Docker
Atlassian Design Guidelines 3
47. Locked-down networks
Communication between JIRA and Docker
could be blocked in some customer networks
Complexity
Extra steps to install plugin could be off-putting,
especially for trial customers
Risks
of using
Docker
Atlassian Design Guidelines 3
48. Locked-down networks
Communication between JIRA and Docker
could be blocked in some customer networks
Complexity
Extra steps to install plugin could be off-putting,
especially for trial customers
Risks
of using
Docker
Atlassian Design Guidelines 3
49. Docker for your Cloud add-on
is worthwhile in itself
TOO RISKY?