The document provides 10 tips for building battle-tested Atlassian Connect add-ons:
1. Automate deployments so they are a single button press.
2. Create rules for deploying to production to make it easy and safe.
3. Understand dependencies and implications of what is built and used.
4. Use other services where it makes sense to avoid reinventing the wheel.
5. Monitor components, servers, applications, users to know where failures happen.
6. Have recovery plans tested regularly to prepare for failures.
7. Handle failures by focusing on fixing issues with notifications and status updates.
8. Plan for traffic patterns to ensure scaling is possible when needed.
9. First time
Automate
More automation
New Servers
cd /opt/applications
mv the-app the-app.050717
mkdir the-app
curl http://my-build-server/artifact/12.tar.gz
tar xvf 12.tar.gz
/etc/init.d/the-app restart
Deployments
19. Automation
The same deployment on
testing as in production
Deployment Rules
Never on Friday
Know when you
should not deploy
Track
Know what commits are
deployed and when
20. Peter Lely
(University of Cambridge)
Newton’s First Law of Motion: Inertia
An object will not change its motion
unless acted on by an unbalanced
force
21. Create rules for yourself
to make it easy to
deploy to production.
TIP #3
29. UNDERSTAND YOUR SLAS
Daily or Monthly?
Are the uptime ranges a
running monthly or a daily
basis.
Trigger points
When are the SLAs triggered?
Remedies
What does the remedy mean
for your product?
36. Component
Micro service, single
end point
Server
VMs
Application
All of the services
that make the
deliverable
End User
The end user’s
experience
What do you monitor?
45. Multiple
Providers
Don’t get tied to a
single provider.
Backups
Daily, Deployment
and manual updates.
Continuous
Delivery
Allows us to recover
somewhere else
Monitoring
Know when and how
large the impact is.
Some of our mitigation tactics
65. location /
{
set $jwt_uri $args;
if ($jwt_uri ~ (.*)(?:&|^)jwt=[^&]*(.*))
{
set $jwt_uri $1$2;
}
set $jwt_uri $is_args$jwt_uri;
if ( $jwt_uri ~ ^&(.*))
{
set $jwt_uri $1;
Nginx Configuration
66. location /installed
{
default_type ‘text/plain’;
lua_need_request_body on;
access_by_lua ‘
local cjson = require “cjson”
local b = ngx.var.request_body
local data = cjson.decode( b )
local clientKey = data.clientKey
local publicKey = data.publicKey
local sharedSecret = data.sharedSecret
Nginx Configuration
67. location /secure
{
access_by_lua ‘
local jwt = require “luajwt”
local args = ngx.req.get_uri_args()
if not args.jwt then
return ngx.exit( 401 )
end
local token = jwt.decode( args.jwt )
local redis = require “redis”
local client = redis.connect( “127.0.0.1”, 6379 )
Nginx Configuration
70. Scale your application
by planning out your
traffic patterns.
TIP #9
https://openresty.org/en/
https://github.com/SkyLothar/lua-resty-jwt
Helpful Resources