How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassian Summit 2010

Post on 17-May-2015

1.920 views 0 download

Tags:

description

How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden Ben Speakmon, Atlassian

Transcript of How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassian Summit 2010

11

How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden

2

Ben Speakmon

Developer Relations

2

Agenda• Developer Relations

• Definitions

• Challenges in writing plugins

• How the SDK addresses them

• SDK in action

• Getting involved

• Wrap-up

33

Developer Relations• Dedicated product team• Started in June 2009• Based in San Francisco• Two full-time developers

• In addition to the SDK…• plugins.atlassian.com• studio.plugins.atlassian.com• Developer documentation

44

What weʼve got to show for it• First SDK release in October 2009

at AtlasCamp• 16 releases since

• plugins.atlassian.com• Over 500 plugins• 1.1 release has searching,

performance, and RSS feed improvements

• studio.plugins.atlassian.com• Over 500 hosted projects

• February 2010 Doc Sprint• Completely new developer

documentation• 20 new tutorials

55

Definitions

•SDK – Software Development Kit

•Maven – Project management tool• Open source project at apache.org• Builds and Dependency management

•Plugin – Code that adds a feature to a product• Maven plugins extend Maven• Atlassian plugins extend Atlassian products

66

Plugin development challenges

• I made this half-pony half-monkey monster to please you

•But I get the feeling that you donʼt like it

•Whatʼs with all the screaming?

• -- Jonathan Coulton, “Skullcrusher Mountain”

77

Effective plugin development

•Different than product development• Work within someone elseʼs sandbox

•Three things that MUST be easy:• Starting the product• Configuring the product• Installing the plugin

88

Challenge #1: Starting the productProduct Startup methodJIRA bin/startup.sh or .bat (standalone) or WAR install into app.

serverConfluence bin/startup.sh or .bat (standalone) or WAR install into app.

serverBamboo bamboo.sh or Win32 service or WAR install into app. server

Crowd start_crowd.sh or .bat (standalone) or WAR install into app. server

FishEye/Crucible run.sh or .bat – no WAR version available

99

Challenge #2: Configuring the productProduct Data and logs

directoryConfiguration

JIRA jira-home WEB-INF/classes/jira-application.properties

Confluence No default WEB-INF/classes/confluence-init.properties

Bamboo No default WEB-INF/classes/bamboo-init.properties

Crowd No default WEB-INF/classes/crowd-init.properties, system property, servlet context property

FishEye/Crucible var FISHEYE_INST environment variable

1010

Challenge #3: Installing a pluginProduct Plugin install methodsJIRA Two plugin directories for different plugin systems, web interface

Confluence Two plugin directories for different plugin systems, web interface, plugin repository

Bamboo Two plugin directories for different plugin systems

Crowd One plugin directory (plugins 2 only)

FishEye/Crucible One plugin directory (plugins 2 only)

1111

And if that wasnʼt enough…

Build systems• Maven 1 or 2? Ant?• Dependencies are really

confusingStarting a plugin project• Expert product knowledge

required just to get started• Maven archetypes are too

hard to use

1212

It all adds up to…

Lots of small headaches == big headache• Not your fault• Not your job to fix them

Slow code/test/debug cycleFrustration

1313

How the SDK deals with the challenges

•“What is happiness? The feeling that power is growing, that resistance is overcome.”• --Friedrich Nietzsche, LISP user

1414

Challenge #1: Starting the product

15

Product Startup methodJIRA bin/startup.sh or .bat (standalone) or WAR install into app. server

Confluence bin/startup.sh or .bat (standalone) or WAR install into app. server

Bamboo bamboo.sh or Win32 service or WAR install into app. server

Crowd start_crowd.sh or .bat (standalone) or WAR install into app. server

FishEye/Crucible run.sh or .bat – no WAR version available

15

Challenge #1: Starting the product

15

Product Startup methodJIRA bin/startup.sh or .bat (standalone) or WAR install into app. server

Confluence bin/startup.sh or .bat (standalone) or WAR install into app. server

Bamboo bamboo.sh or Win32 service or WAR install into app. server

Crowd start_crowd.sh or .bat (standalone) or WAR install into app. server

FishEye/Crucible run.sh or .bat – no WAR version available

15

Challenge #1: Starting the product

• atlas-run15

Product Startup methodJIRA bin/startup.sh or .bat (standalone) or WAR install into app. server

Confluence bin/startup.sh or .bat (standalone) or WAR install into app. server

Bamboo bamboo.sh or Win32 service or WAR install into app. server

Crowd start_crowd.sh or .bat (standalone) or WAR install into app. server

FishEye/Crucible run.sh or .bat – no WAR version available

15

Challenge #2: Configuring the product

16

Product Data and logs directory

Configuration

JIRA jira-home WEB-INF/classes/jira-application.properties

Confluence No default WEB-INF/classes/confluence-init.properties

Bamboo No default WEB-INF/classes/bamboo-init.properties

Crowd No default WEB-INF/classes/crowd-init.properties, system property, servlet context property

FishEye/Crucible var FISHEYE_INST environment variable

16

Challenge #2: Configuring the product

16

Product Data and logs directory

Configuration

JIRA jira-home WEB-INF/classes/jira-application.properties

Confluence No default WEB-INF/classes/confluence-init.properties

Bamboo No default WEB-INF/classes/bamboo-init.properties

Crowd No default WEB-INF/classes/crowd-init.properties, system property, servlet context property

FishEye/Crucible var FISHEYE_INST environment variable

16

Challenge #2: Configuring the product

• Logs sent to console

16

Product Data and logs directory

Configuration

JIRA jira-home WEB-INF/classes/jira-application.properties

Confluence No default WEB-INF/classes/confluence-init.properties

Bamboo No default WEB-INF/classes/bamboo-init.properties

Crowd No default WEB-INF/classes/crowd-init.properties, system property, servlet context property

FishEye/Crucible var FISHEYE_INST environment variable

16

Challenge #2: Configuring the product

• Logs sent to console

• Preconfigured data directories16

Product Data and logs directory

Configuration

JIRA jira-home WEB-INF/classes/jira-application.properties

Confluence No default WEB-INF/classes/confluence-init.properties

Bamboo No default WEB-INF/classes/bamboo-init.properties

Crowd No default WEB-INF/classes/crowd-init.properties, system property, servlet context property

FishEye/Crucible var FISHEYE_INST environment variable

16

Challenge #3: Installing a plugin

17

Product Plugin install methodsJIRA Two plugin directories for different plugin systems, web interface

Confluence Two plugin directories for different plugin systems, web interface, plugin repository

Bamboo Two plugin directories for different plugin systems

Crowd One plugin directory (plugins 2 only)

FishEye/Crucible One plugin directory (plugins 2 only)

17

Challenge #3: Installing a plugin

17

Product Plugin install methodsJIRA Two plugin directories for different plugin systems, web interface

Confluence Two plugin directories for different plugin systems, web interface, plugin repository

Bamboo Two plugin directories for different plugin systems

Crowd One plugin directory (plugins 2 only)

FishEye/Crucible One plugin directory (plugins 2 only)

17

Challenge #3: Installing a plugin

• Automatic through atlas-run17

Product Plugin install methodsJIRA Two plugin directories for different plugin systems, web interface

Confluence Two plugin directories for different plugin systems, web interface, plugin repository

Bamboo Two plugin directories for different plugin systems

Crowd One plugin directory (plugins 2 only)

FishEye/Crucible One plugin directory (plugins 2 only)

17

SDK Design

•“You can get more of what you want with a kind word and a gun than you can with just a kind word.”• --Al Capone, project manager

1818

Atlassian Maven Plugins Suite

•Suite of Maven plugins • maven-jira-plugin, maven-confluence-plugin, etc.

•Common interface to products:• Handles installation and configuration

•Can be used independently of the SDK• Very handy if you already have a Maven system

1919

Script shortcutsTask Maven command Script shortcutStart the product with the current plugin preinstalled

mvn amps:run atlas-run

Start the product with the current plugin preinstalled and allow a debugger to attach

mvn amps:debug atlas-debug

Start JIRA on port 8243 and context “myjira” with the current plugin preinstalled

mvn amps:run –Dproduct=jira –Dcontext.path=/myjira –Dhttp.port=8243

atlas-run--product jira--context-path /myjira--http-port 8243

Run an arbitrary Maven command mvn myplugin:mygoal <parameters>

atlas-mvn myplugin:mygoal<parameters>

2020

SDK in action

•A thousand moral paintings I can show

•That shall demonstrate these quick blows of Fortuneʼs

•More pregnantly than words.• Timon of Athens, I:i

2121

30-second Plugin Creation™

•Creating a plugin is dirt simple!• atlas-create-<product>-plugin

•Executes a Maven archetype•Automatically prompts for required information•Created plugin works out of the box

2222

Creating a new JIRA plugin

2323

Creating a new JIRA plugin

2323

Automatic resource reloading

Plugin web resources are monitored• Detects changes and

automatically updates

Reinstall plugin for Java updates

2424

Changing a live gadget

2525

Changing a live gadget

2525

Boxed Maven

Contains a standalone, isolated Maven 2.1.0• Uses Atlassian repositories by

default• No extra configuration needed

Usable on its own• atlas-mvn passes parameters

and goals straight through

2626

Getting involved

•Be the change you seek.• -- Atlassian Value the Fifth

2727

Vital statistics

•The SDK is open source • Apache 2.0

•Frequent updates, both features and support for new releases•Committers outside Atlassian• Preconfigured home directories - Jonathan Doklovic

2828

Helping out"

• http://studio.atlassian.com/browse/AMPS

•Things YOU can help with right now:• Documentation• Testing on Windows

•Features YOU can help with:• Per-plugin storage• Integrated release process to PAC and Maven

2929

AtlasCamp – October 2010

3030

AtlasCamp – October 2010

3030

AtlasCamp – October 2010

3030

AtlasCamp – October 2010

3030

AtlasCamp – October 2010

3030

AtlasCamp – October 2010

3030

Wrap-upSDK makes plugin and gadget

creation easier

Works in all products

Faster code/test/debug cycle

Tight integration with Atlassian build systems

Flexible enough to also work in your system

3131

Resources• Writing plugins: http://confluence.atlassian.com/x/CgbvCw

• Marketing for plugins: http://plugins.atlassian.com

• Hosting for plugins: http://studio.plugins.atlassian.com

• Developer forums: http://forums.atlassian.com

• Contact Developer Relations:• developer-relations@atlassian.com• irc.freenode.net #atlassiandev

3232