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

46
1 1

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

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

11

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

How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden

2

Ben Speakmon

Developer Relations

2

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

Agenda• Developer Relations

• Definitions

• Challenges in writing plugins

• How the SDK addresses them

• SDK in action

• Getting involved

• Wrap-up

33

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Creating a new JIRA plugin

2323

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

Creating a new JIRA plugin

2323

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

Automatic resource reloading

Plugin web resources are monitored• Detects changes and

automatically updates

Reinstall plugin for Java updates

2424

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

Changing a live gadget

2525

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

Changing a live gadget

2525

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

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

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

Getting involved

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

2727

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

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

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

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

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

AtlasCamp – October 2010

3030

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

AtlasCamp – October 2010

3030

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

AtlasCamp – October 2010

3030

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

AtlasCamp – October 2010

3030

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

AtlasCamp – October 2010

3030

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

AtlasCamp – October 2010

3030

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

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

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

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:• [email protected]• irc.freenode.net #atlassiandev

3232