SlideShare a Scribd company logo
1 of 64
Download to read offline
1
Taming the Cloud Database
with
Apache jclouds
http://rack.to/ace14db
Before we begin: Setup
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
2
Virtual Machine pre-setup provided
http://rack.to/ace14vm
Avoid downloading during this presentation
Before we begin: Setup
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
3
Alternatively you need
Oracle Java 7
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-
ubuntu-via.html
maven
http://maven.apache.org/download.cgi
git config --global core.autocrlf false
Before we begin: Setup
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
4
Testing on your machine (no subscriptions)
Devstack
http://devstack.org/
http://blog.phymata.com/2014/04/18/devstack-icehouse-on-the-
rackspace-cloud/
Providers: Rackspace, HP, others
http://www.openstack.org/marketplace/public-clouds/
http://rack.to/ace14
Before we begin: Setup
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
5
git clone https://github.com/zack-shoylev/jclouds-
developer-examples.git
Multiple branches
git clone https://github.com/rackerlabs/jclouds-
examples.git
Branch trove-example-only
Introductions
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
6
➢ Zack Shoylev
➢ irc: zacksh twitter: @zackshoylev
freenode #jclouds
Also email
@rackspace.com
Introductions
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
7
Developer Experience
https://developer.rackspace.com/support/
Goals
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
8
➢ jclouds
➢ Create a database in the cloud
➢ Abstractions and how to contribute
➢ How to add support for an API
The Cloud
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
9
➢ Networked and distributed computing
➢ Variety of services
➢ Compute (servers)
➢ Storage (files)
➢ Databases
➢ Email
➢ …
The Cloud
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
10
➢ Can’t someone else do it?
The Cloud
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
11
The Cloud
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
12
➢ Public cloud (external provider)
➢ Private cloud (internal deployment)
➢ Hybrid cloud
➢ Public + Private
Rackspace
example
The Cloud
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
13
Your
System
S
D
K
Cloud
AP
I
VM
VM
VM
➢ This can be an application server
➢ Or your home machine
➢ Or belong to one of your end users
➢ Or a cloud VM
➢ Or a smartphone
jclouds
The Cloud
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
14
➢ Advantages
➢ Metered pricing (pay as you go)
➢ Project scalability (unlimited)
➢ Safer (offsite/redundant)
➢ Economies of scale
➢ Expertise
➢ Support
The Cloud
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
15
➢ Disadvantages
➢ Less hardware control
➢ Provider-controlled downtime
➢ Virtualization (efficiency)
➢ Provider lock-in
➢ Provider-specific apis/sdks/features
➢ Expensive to switch clouds or deploy locally
➢ jclouds minimizes this disadvantage
The Cloud
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
16
➢ Database specific advantages
➢ Optimized by provider
➢ Settings
➢ Container virtualization
➢ Automated software updates
➢ Redundant data storage
➢ Backup
➢ Migration
➢ Choice
➢ Clustering (upcoming)
➢ Support
OpenStack
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
17
➢ Cloud OS
➢ Open-sourced by Rackspace and NASA
(2010)
➢ Free
➢ Supported
➢ AT&T, HP, IBM, Red Hat, Rackspace, Dell, Cisco,
Intel, VMware, …
OpenStack
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
18
➢ http://stackalytics.com/
jclouds
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
19
➢ Cloud SDK
➢ Apache project
➢ Java (and Clojure)
➢ Easy
➢ Portable
➢ Cloud-agnostic
➢ Community
➢ Open source
jclouds
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
20
➢ https://jclouds.apache.org/
jclouds
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
21
➢ HTTP requests, responses, retries
➢ Authentication and re-authentication
➢ Pagination
➢ Polling
➢ Rate limits
➢ Retries
➢ Abstractions
➢ Logging
➢ Less code
jclouds
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
22
jclouds
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
23
➢ Services
➢ Storage
➢ Compute
➢ VM Images
➢ Load Balancers
➢ DNS
➢ Databases
➢ …
➢ Providers
➢ Openstack
➢ Rackspace
➢ HP
➢ Amazon
➢ Azure
➢ …
jclouds
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
24
AWS aws-ec2 US-VA,US-CA,IE,SG
Bluelock bluelock-vcloud-zone01 US-IN
CloudSigma US cloudsigma-lvs US-NV
CloudSigma CH cloudsigma-zrh CH-ZH
CloudSigma DC cloudsigma-wdc US-DC
DigitalOcean digitalocean
ElasticHosts GB elastichosts-lon-b GB-LND
ElasticHosts GB elastichosts-lon-p GB-LND
ElasticHosts US elastichosts-sat-p US-TX
Go2Cloud go2cloud-jhb1 ZA-GP
GoGrid gogrid US-CA,US-VA
Green House Data greenhousedata-element-
vcloud
US-WY
HP hpcloud-compute US-NV
Ninefold ninefold-compute AU-NSW
OpenHosting openhosting-east1 US-VA
Rackspace UK (First Gen) cloudservers-uk GB-SLG
Rackspace US (First Gen) cloudservers-us US-IL,US-TX
Rackspace UK (Next Gen) rackspace-cloudservers-uk GB-SLG
Rackspace US (Next Gen) rackspace-cloudservers-us US-IL,US-TX
SeverLove serverlove-z1-man GB-MAN
SkaliCloud skalicloud-sdg-my MY-10
SoftLayer softlayer
Compute
Providers
jclouds
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
25
➢ Showcase database code
➢ Best practices
➢ Compare with compute code
➢ Gotchas and workarounds
➢ Abstractions
Requirements
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
26
➢ Maven 3
➢ Java 7+
➢ jclouds
➢ Windows or Linux [etc..] (thanks Java!)
Java Project
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
27
Skeleton
Project
Create User
Create Instance
Initialize API
Create Database
Test Connection
Cleanup
Java Project
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
28
➢ Maven Dependencies
➢ Selective subset
➢ Versioning
➢ jclouds-labs
POM
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
29
https://github.com/jclouds/jclouds-examples/blob/master/rackspace/pom.xml
<dependency>
<groupId>org.apache.jclouds.provider</groupId>
<artifactId>rackspace-clouddatabases-us</artifactId>
<version>${jclouds.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.25</version>
</dependency>
POM
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
30
mvn dependency:copy-dependencies "-DoutputDirectory=./lib"
Logging
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
31
// This module is responsible for enabling logging
Iterable<Module> modules = ImmutableSet.<Module> of(new SLF4JLoggingModule());
ComputeServiceContext context = ContextBuilder.newBuilder(provider)
.credentials(username, apiKey)
.modules(modules) // don't forget to add the modules to your context!
.buildView(ComputeServiceContext.class);
logback.xml
<configuration scan="false">
…
<appender name="WIREFILE" class="ch.qos.logback.core.FileAppender">
<file>target/test-data/jclouds-wire.log</file>
<encoder>
<Pattern>%d %-5p [%c] [%thread] %m%n</Pattern>
</encoder>
</appender>
Java Project
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
32
Skeleton
Project
Create User
Create Instance
Initialize API
Create Database
Test Connection
Cleanup
Initialize
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
33
private final TroveApi troveApi;
troveApi = ContextBuilder
.newBuilder("rackspace-clouddatabases-us")
.credentials(username, apiKey)
.buildApi(TroveApi.class);
Architecture
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
34
Cloud Databases
Trove
jclouds-database
Increasing level of
abstraction
Provider
settings:
Endpoint, etc.
Implementation
code
Abstraction
s
Architecture
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
35
Cloud Databases
Trove
jclouds-database
Increasing level of
abstraction
Provider
settings:
Endpoint, etc.
Implementation
code
Abstraction
s
Not implemented
Initialize
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
36
private final FlavorApi flavorApi;
flavorApi = troveApi.getFlavorApiForZone(ZONE);
APIs
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
37
➢ TroveApi
➢ FlavorApi
➢ InstanceApi
➢ DatabaseApi
➢ UserApi
➢ Utils
Java Project
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
38
Skeleton
Project
Create User
Create Instance
Initialize API
Create Database
Test Connection
Cleanup
Create Instance
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
39
Flavor flavor = Iterables.getFirst(flavorApi.list(), null);
…
Instance instance = instanceApi.create(flavorId, size, name);
flavor.getId()
Volume size in
GB
Create Instance
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
40
Instance updatedInstance = awaitAvailable(instance, instanceApi);
Create Instance
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
41
Instance updatedInstance = awaitAvailable(instance, instanceApi);
Polls status, waits until ready. Will not retry by
itself!
Actual Code
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
42
InstanceApi instanceApi = api.getInstanceApiForZone(zone);
for (int retries = 0; retries < 10; retries++) {
Instance instance = null;
try {
instance = instanceApi.create(flavorId, size, name);
} catch (Exception e) {
Uninterruptibles.sleepUninterruptibly(15, TimeUnit.SECONDS);
logger.error(Arrays.toString(e.getStackTrace()));
continue;
}
Instance updatedInstance = awaitAvailable(instance, instanceApi);
if (updatedInstance != null) {
return updatedInstance;
}
instanceApi.delete(instance.getId());
InstancePredicates.awaitDeleted(instanceApi).apply(instance);
}
return null;
Actual Code
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
43
Utils.
getWorkingInstance(
String zone,
String name,
String flavorId,
int size)
Java Project
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
44
Skeleton
Project
Create User
Create Instance
Initialize API
Create Database
Test Connection
Cleanup
Create Database
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
45
troveApi = ContextBuilder.newBuilder(PROVIDER)
.credentials(username, apiKey)
.buildApi(TroveApi.class);
instanceApi = troveApi.getInstanceApiForZone(ZONE);
databaseApi = troveApi
.getDatabaseApiForZoneAndInstance(ZONE,getInstance().getId());
getSomeApiForXandYandZ – fairly common in jclouds
Create Database
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
46
boolean result = databaseApi.create(NAME);
Java Project
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
47
Skeleton
Project
Create User
Create Instance
Initialize API
Create Database
Test Connection
Cleanup
Create User
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
48
userApi = troveApi
.getUserApiForZoneAndInstance(ZONE, instance.getId());
boolean result = userApi.create(UNAME, PASSWORD, DBNAME);
User name
User password
Database
name
Java Project
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
49
Skeleton
Project
Create User
Create Instance
Initialize API
Create Database
Test Connection
Cleanup
Test Connection
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
50
Load balancer needed!
CreateLoadBalancer createLB = CreateLoadBalancer.
builder()
.name(NAME)
.protocol("MYSQL")
.port(3306)
.algorithm(LoadBalancer.Algorithm.RANDOM)
.nodes(addNodes)
.virtualIPType(VirtualIP.Type.PUBLIC)
.build();
Test Connection
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
51
loadBalancer = lbApi.create(createLB);
Test Connection
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
52
StringBuilder connString = new StringBuilder();
connString.append("jdbc:mysql://");
connString
.append(getVirtualIPv4(getLb().getVirtualIPs()));
connString.append("/");
connString.append(DBNAME); connString.append("?
user=");
connString.append(UNAME);
connString.append("&password=");
connString.append(PASSWORD);
Test Connection
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
53
Connection conn =
DriverManager.getConnection(connString.toString());
Test Connection
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
54
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT 3+5");
rs.first();
System.out.format(" 3+5 is %s%n", rs.getInt(1));
Going forward
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
55
➢ jclouds examples
➢ https://github.com/jclouds/jclouds-examples
➢ More docs
➢ http://jclouds.incubator.apache.org/documentation/
➢ http://javadocs.jclouds.cloudbees.net/
➢ Maven alternatives?
➢ http://jclouds.incubator.apache.
org/documentation/userguide/installation-guide/
➢ Contribute!
➢ https://wiki.apache.org/jclouds/How%20to%
20Contribute
Java Project
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
56
➢ Linux
➢ Compile
➢ javac -classpath "lib/*:src/main/java/:src/main/resources/"
src/main/java/org/jclouds/examples/rackspace/*.java
➢ Run
➢ java -classpath "lib/*:src/main/java/:src/main/resources/" org.jclouds.examples.
rackspace.clouddatabases.CreateInstance username apikey
Java Project
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
57
➢ Windows
➢ Compile
➢ javac -classpath "lib/*;src/main/java/;src/main/resources/"
src/main/java/org/jclouds/examples/rackspace/*.java
➢ Run
➢ java -classpath "lib/*;src/main/java/;src/main/resources/" org.jclouds.examples.
rackspace.clouddatabases.CreateInstance username apikey
Going forward
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
58
➢ TroveApi
➢ Backup Extension
➢ Settings Extension
➢ Clustering
➢ Abstraction layer
Going forward
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
59
➢ TroveApi
➢ Backup Extension
➢ Settings Extension
➢ Clustering
➢ Abstraction layer
Rackspac
e
Microsof
t
Amazo
n
CouchDB
Salesforc
e
Going forward
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
60
➢ TroveApi
➢ Backup Extension
➢ Settings Extension
➢ Clustering
➢ Abstraction layer
Rackspac
e
Microsof
t
Amazo
n
CouchDB
Salesforc
e
Going forward
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
61
Collaborate!
http://jclouds.apache.org/
http://jclouds.apache.org/community/
Implementing an API
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
62
Fork <link to my fork>
Alternatively, fork jclouds-labs-openstack (for
openstack).
Implementing an API
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
63
On to the IDE
Taming the Cloud Database with Apache jclouds http://rack.
to/ace14db
64
Thank you!
http://developer.rackspace.com
sdk-support@rackspace.com
Zack Shoylev
Software Developer
zacksh #jclouds
@zackshoylev

More Related Content

What's hot

modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet CampPuppet
 
Cloudera hadoop installation
Cloudera hadoop installationCloudera hadoop installation
Cloudera hadoop installationSumitra Pundlik
 
Think Distributed: The Hazelcast Way
Think Distributed: The Hazelcast WayThink Distributed: The Hazelcast Way
Think Distributed: The Hazelcast WayRahul Gupta
 
Introduction to Stacki at Atlanta Meetup February 2016
Introduction to Stacki at Atlanta Meetup February 2016Introduction to Stacki at Atlanta Meetup February 2016
Introduction to Stacki at Atlanta Meetup February 2016StackIQ
 
Nuvola: a tale of migration to AWS
Nuvola: a tale of migration to AWSNuvola: a tale of migration to AWS
Nuvola: a tale of migration to AWSMatteo Moretti
 
Configuration management and deployment with ansible
Configuration management and deployment with ansibleConfiguration management and deployment with ansible
Configuration management and deployment with ansibleIvan Dimitrov
 
Australian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackAustralian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackMatt Ray
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016StackIQ
 
Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015Fastly
 
Apache Traffic Server & Lua
Apache Traffic Server & LuaApache Traffic Server & Lua
Apache Traffic Server & LuaKit Chan
 
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014Amazon Web Services
 
Scaling Your Cache
Scaling Your CacheScaling Your Cache
Scaling Your CacheAlex Miller
 
Hazelcast Essentials
Hazelcast EssentialsHazelcast Essentials
Hazelcast EssentialsRahul Gupta
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesAmazon Web Services
 
Challenges when building high profile editorial sites
Challenges when building high profile editorial sitesChallenges when building high profile editorial sites
Challenges when building high profile editorial sitesYann Malet
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh thingsMarcus Deglos
 
Stupid Boot Tricks: using ipxe and chef to get to boot management bliss
Stupid Boot Tricks: using ipxe and chef to get to boot management blissStupid Boot Tricks: using ipxe and chef to get to boot management bliss
Stupid Boot Tricks: using ipxe and chef to get to boot management blissmacslide
 
Integrated Cache on Netscaler
Integrated Cache on NetscalerIntegrated Cache on Netscaler
Integrated Cache on NetscalerMark Hillick
 

What's hot (20)

modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
 
Carlos Conde : AWS Game Days - TIAD Paris
Carlos Conde : AWS Game Days - TIAD ParisCarlos Conde : AWS Game Days - TIAD Paris
Carlos Conde : AWS Game Days - TIAD Paris
 
Cloudera hadoop installation
Cloudera hadoop installationCloudera hadoop installation
Cloudera hadoop installation
 
Think Distributed: The Hazelcast Way
Think Distributed: The Hazelcast WayThink Distributed: The Hazelcast Way
Think Distributed: The Hazelcast Way
 
Introduction to Stacki at Atlanta Meetup February 2016
Introduction to Stacki at Atlanta Meetup February 2016Introduction to Stacki at Atlanta Meetup February 2016
Introduction to Stacki at Atlanta Meetup February 2016
 
Nuvola: a tale of migration to AWS
Nuvola: a tale of migration to AWSNuvola: a tale of migration to AWS
Nuvola: a tale of migration to AWS
 
Configuration management and deployment with ansible
Configuration management and deployment with ansibleConfiguration management and deployment with ansible
Configuration management and deployment with ansible
 
Australian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackAustralian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStack
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016
 
Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015
 
Apache Traffic Server & Lua
Apache Traffic Server & LuaApache Traffic Server & Lua
Apache Traffic Server & Lua
 
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014
 
Scaling Your Cache
Scaling Your CacheScaling Your Cache
Scaling Your Cache
 
Advanced Cassandra
Advanced CassandraAdvanced Cassandra
Advanced Cassandra
 
Hazelcast Essentials
Hazelcast EssentialsHazelcast Essentials
Hazelcast Essentials
 
Deep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instancesDeep Dive on Amazon EC2 instances
Deep Dive on Amazon EC2 instances
 
Challenges when building high profile editorial sites
Challenges when building high profile editorial sitesChallenges when building high profile editorial sites
Challenges when building high profile editorial sites
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh things
 
Stupid Boot Tricks: using ipxe and chef to get to boot management bliss
Stupid Boot Tricks: using ipxe and chef to get to boot management blissStupid Boot Tricks: using ipxe and chef to get to boot management bliss
Stupid Boot Tricks: using ipxe and chef to get to boot management bliss
 
Integrated Cache on Netscaler
Integrated Cache on NetscalerIntegrated Cache on Netscaler
Integrated Cache on Netscaler
 

Viewers also liked

Taming the Cloud Database with Apache jclouds
Taming the Cloud Database with Apache jcloudsTaming the Cloud Database with Apache jclouds
Taming the Cloud Database with Apache jcloudszshoylev
 
Các mã sản phẩm
Các mã sản phẩmCác mã sản phẩm
Các mã sản phẩmJuly Rain
 
LAN's by Group 1
LAN's by Group 1LAN's by Group 1
LAN's by Group 1Amanda2345
 
Sandra sanchezintegradora1
Sandra sanchezintegradora1Sandra sanchezintegradora1
Sandra sanchezintegradora1Sandra Sánchez
 
Structure of taxation and classification of taxes
Structure of taxation and classification of taxesStructure of taxation and classification of taxes
Structure of taxation and classification of taxesshaik moin
 
Glossary english ma. gpe. mata
Glossary english ma. gpe. mataGlossary english ma. gpe. mata
Glossary english ma. gpe. mataLupita Mata Garcia
 
The niche in the market: The case of Belgian Wines
The niche in the market: The case of Belgian WinesThe niche in the market: The case of Belgian Wines
The niche in the market: The case of Belgian WinesJonas De Maere
 
8th class-result-2013-faisalabad
8th class-result-2013-faisalabad8th class-result-2013-faisalabad
8th class-result-2013-faisalabadAdeel Ashiq
 
A Theoretical Analysis of the Tenets of Multinational Enterprise (MNE)
A Theoretical Analysis of the Tenets of Multinational Enterprise (MNE)A Theoretical Analysis of the Tenets of Multinational Enterprise (MNE)
A Theoretical Analysis of the Tenets of Multinational Enterprise (MNE)Claretta Webb
 

Viewers also liked (16)

Taming the Cloud Database with Apache jclouds
Taming the Cloud Database with Apache jcloudsTaming the Cloud Database with Apache jclouds
Taming the Cloud Database with Apache jclouds
 
Các mã sản phẩm
Các mã sản phẩmCác mã sản phẩm
Các mã sản phẩm
 
LAN's by Group 1
LAN's by Group 1LAN's by Group 1
LAN's by Group 1
 
Sandra sanchezintegradora1
Sandra sanchezintegradora1Sandra sanchezintegradora1
Sandra sanchezintegradora1
 
Planet
PlanetPlanet
Planet
 
Structure of taxation and classification of taxes
Structure of taxation and classification of taxesStructure of taxation and classification of taxes
Structure of taxation and classification of taxes
 
Glossary english ma. gpe. mata
Glossary english ma. gpe. mataGlossary english ma. gpe. mata
Glossary english ma. gpe. mata
 
The niche in the market: The case of Belgian Wines
The niche in the market: The case of Belgian WinesThe niche in the market: The case of Belgian Wines
The niche in the market: The case of Belgian Wines
 
Itqon
ItqonItqon
Itqon
 
KERJA
KERJAKERJA
KERJA
 
La Coruña 2013
La Coruña 2013La Coruña 2013
La Coruña 2013
 
Digestive system
Digestive systemDigestive system
Digestive system
 
Skill Accelerator Presentation
Skill Accelerator PresentationSkill Accelerator Presentation
Skill Accelerator Presentation
 
8th class-result-2013-faisalabad
8th class-result-2013-faisalabad8th class-result-2013-faisalabad
8th class-result-2013-faisalabad
 
Reflexes
ReflexesReflexes
Reflexes
 
A Theoretical Analysis of the Tenets of Multinational Enterprise (MNE)
A Theoretical Analysis of the Tenets of Multinational Enterprise (MNE)A Theoretical Analysis of the Tenets of Multinational Enterprise (MNE)
A Theoretical Analysis of the Tenets of Multinational Enterprise (MNE)
 

Similar to Taming Cloud Databases with Apache jclouds

.NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time....NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time...Michele Leroux Bustamante
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Arun Gupta
 
Running your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudRunning your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudArun Gupta
 
JFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the CloudJFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the CloudArun Gupta
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudArun Gupta
 
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Amazon Web Services
 
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011Running your Java EE 6 Apps in the Cloud - JavaOne India 2011
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011Arun Gupta
 
JavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
JavaOne India 2011 - Running your Java EE 6 Apps in the CloudJavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
JavaOne India 2011 - Running your Java EE 6 Apps in the CloudArun Gupta
 
Automating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with PuppetAutomating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with Puppetbuildacloud
 
Gaming across multiple devices
Gaming across multiple devicesGaming across multiple devices
Gaming across multiple devicesPatric Boscolo
 
Cloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSCloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSAmine Sadry
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetesBen Hall
 
Running your Java EE 6 applications in the cloud
Running your Java EE 6 applications in the cloudRunning your Java EE 6 applications in the cloud
Running your Java EE 6 applications in the cloudArun Gupta
 
Javaee6 Jazoon 2010 100603081147 Phpapp01
Javaee6 Jazoon 2010 100603081147 Phpapp01Javaee6 Jazoon 2010 100603081147 Phpapp01
Javaee6 Jazoon 2010 100603081147 Phpapp01MindTree Ltd
 
Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly -Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly -Giulio Vian
 
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom FifieldOSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom FifieldOSCON Byrum
 
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricScale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricWim Van den Broeck
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...Timofey Turenko
 
Where is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleWhere is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleRafał Leszko
 
Trouble shooting apachecloudstack
Trouble shooting apachecloudstackTrouble shooting apachecloudstack
Trouble shooting apachecloudstackSailaja Sunil
 

Similar to Taming Cloud Databases with Apache jclouds (20)

.NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time....NET Developer Days - So many Docker platforms, so little time...
.NET Developer Days - So many Docker platforms, so little time...
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)
 
Running your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudRunning your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the Cloud
 
JFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the CloudJFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the Cloud
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the Cloud
 
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
 
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011Running your Java EE 6 Apps in the Cloud - JavaOne India 2011
Running your Java EE 6 Apps in the Cloud - JavaOne India 2011
 
JavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
JavaOne India 2011 - Running your Java EE 6 Apps in the CloudJavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
JavaOne India 2011 - Running your Java EE 6 Apps in the Cloud
 
Automating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with PuppetAutomating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with Puppet
 
Gaming across multiple devices
Gaming across multiple devicesGaming across multiple devices
Gaming across multiple devices
 
Cloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWSCloud 101: Hands-on Heroku & AWS
Cloud 101: Hands-on Heroku & AWS
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Running your Java EE 6 applications in the cloud
Running your Java EE 6 applications in the cloudRunning your Java EE 6 applications in the cloud
Running your Java EE 6 applications in the cloud
 
Javaee6 Jazoon 2010 100603081147 Phpapp01
Javaee6 Jazoon 2010 100603081147 Phpapp01Javaee6 Jazoon 2010 100603081147 Phpapp01
Javaee6 Jazoon 2010 100603081147 Phpapp01
 
Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly -Terraform for azure: the good, the bad and the ugly -
Terraform for azure: the good, the bad and the ugly -
 
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom FifieldOSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
 
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricScale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabric
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
 
Where is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by exampleWhere is my cache architectural patterns for caching microservices by example
Where is my cache architectural patterns for caching microservices by example
 
Trouble shooting apachecloudstack
Trouble shooting apachecloudstackTrouble shooting apachecloudstack
Trouble shooting apachecloudstack
 

Recently uploaded

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Taming Cloud Databases with Apache jclouds

  • 1. 1 Taming the Cloud Database with Apache jclouds http://rack.to/ace14db
  • 2. Before we begin: Setup Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 2 Virtual Machine pre-setup provided http://rack.to/ace14vm Avoid downloading during this presentation
  • 3. Before we begin: Setup Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 3 Alternatively you need Oracle Java 7 http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in- ubuntu-via.html maven http://maven.apache.org/download.cgi git config --global core.autocrlf false
  • 4. Before we begin: Setup Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 4 Testing on your machine (no subscriptions) Devstack http://devstack.org/ http://blog.phymata.com/2014/04/18/devstack-icehouse-on-the- rackspace-cloud/ Providers: Rackspace, HP, others http://www.openstack.org/marketplace/public-clouds/ http://rack.to/ace14
  • 5. Before we begin: Setup Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 5 git clone https://github.com/zack-shoylev/jclouds- developer-examples.git Multiple branches git clone https://github.com/rackerlabs/jclouds- examples.git Branch trove-example-only
  • 6. Introductions Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 6 ➢ Zack Shoylev ➢ irc: zacksh twitter: @zackshoylev freenode #jclouds Also email @rackspace.com
  • 7. Introductions Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 7 Developer Experience https://developer.rackspace.com/support/
  • 8. Goals Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 8 ➢ jclouds ➢ Create a database in the cloud ➢ Abstractions and how to contribute ➢ How to add support for an API
  • 9. The Cloud Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 9 ➢ Networked and distributed computing ➢ Variety of services ➢ Compute (servers) ➢ Storage (files) ➢ Databases ➢ Email ➢ …
  • 10. The Cloud Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 10 ➢ Can’t someone else do it?
  • 11. The Cloud Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 11
  • 12. The Cloud Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 12 ➢ Public cloud (external provider) ➢ Private cloud (internal deployment) ➢ Hybrid cloud ➢ Public + Private Rackspace example
  • 13. The Cloud Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 13 Your System S D K Cloud AP I VM VM VM ➢ This can be an application server ➢ Or your home machine ➢ Or belong to one of your end users ➢ Or a cloud VM ➢ Or a smartphone jclouds
  • 14. The Cloud Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 14 ➢ Advantages ➢ Metered pricing (pay as you go) ➢ Project scalability (unlimited) ➢ Safer (offsite/redundant) ➢ Economies of scale ➢ Expertise ➢ Support
  • 15. The Cloud Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 15 ➢ Disadvantages ➢ Less hardware control ➢ Provider-controlled downtime ➢ Virtualization (efficiency) ➢ Provider lock-in ➢ Provider-specific apis/sdks/features ➢ Expensive to switch clouds or deploy locally ➢ jclouds minimizes this disadvantage
  • 16. The Cloud Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 16 ➢ Database specific advantages ➢ Optimized by provider ➢ Settings ➢ Container virtualization ➢ Automated software updates ➢ Redundant data storage ➢ Backup ➢ Migration ➢ Choice ➢ Clustering (upcoming) ➢ Support
  • 17. OpenStack Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 17 ➢ Cloud OS ➢ Open-sourced by Rackspace and NASA (2010) ➢ Free ➢ Supported ➢ AT&T, HP, IBM, Red Hat, Rackspace, Dell, Cisco, Intel, VMware, …
  • 18. OpenStack Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 18 ➢ http://stackalytics.com/
  • 19. jclouds Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 19 ➢ Cloud SDK ➢ Apache project ➢ Java (and Clojure) ➢ Easy ➢ Portable ➢ Cloud-agnostic ➢ Community ➢ Open source
  • 20. jclouds Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 20 ➢ https://jclouds.apache.org/
  • 21. jclouds Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 21 ➢ HTTP requests, responses, retries ➢ Authentication and re-authentication ➢ Pagination ➢ Polling ➢ Rate limits ➢ Retries ➢ Abstractions ➢ Logging ➢ Less code
  • 22. jclouds Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 22
  • 23. jclouds Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 23 ➢ Services ➢ Storage ➢ Compute ➢ VM Images ➢ Load Balancers ➢ DNS ➢ Databases ➢ … ➢ Providers ➢ Openstack ➢ Rackspace ➢ HP ➢ Amazon ➢ Azure ➢ …
  • 24. jclouds Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 24 AWS aws-ec2 US-VA,US-CA,IE,SG Bluelock bluelock-vcloud-zone01 US-IN CloudSigma US cloudsigma-lvs US-NV CloudSigma CH cloudsigma-zrh CH-ZH CloudSigma DC cloudsigma-wdc US-DC DigitalOcean digitalocean ElasticHosts GB elastichosts-lon-b GB-LND ElasticHosts GB elastichosts-lon-p GB-LND ElasticHosts US elastichosts-sat-p US-TX Go2Cloud go2cloud-jhb1 ZA-GP GoGrid gogrid US-CA,US-VA Green House Data greenhousedata-element- vcloud US-WY HP hpcloud-compute US-NV Ninefold ninefold-compute AU-NSW OpenHosting openhosting-east1 US-VA Rackspace UK (First Gen) cloudservers-uk GB-SLG Rackspace US (First Gen) cloudservers-us US-IL,US-TX Rackspace UK (Next Gen) rackspace-cloudservers-uk GB-SLG Rackspace US (Next Gen) rackspace-cloudservers-us US-IL,US-TX SeverLove serverlove-z1-man GB-MAN SkaliCloud skalicloud-sdg-my MY-10 SoftLayer softlayer Compute Providers
  • 25. jclouds Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 25 ➢ Showcase database code ➢ Best practices ➢ Compare with compute code ➢ Gotchas and workarounds ➢ Abstractions
  • 26. Requirements Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 26 ➢ Maven 3 ➢ Java 7+ ➢ jclouds ➢ Windows or Linux [etc..] (thanks Java!)
  • 27. Java Project Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 27 Skeleton Project Create User Create Instance Initialize API Create Database Test Connection Cleanup
  • 28. Java Project Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 28 ➢ Maven Dependencies ➢ Selective subset ➢ Versioning ➢ jclouds-labs
  • 29. POM Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 29 https://github.com/jclouds/jclouds-examples/blob/master/rackspace/pom.xml <dependency> <groupId>org.apache.jclouds.provider</groupId> <artifactId>rackspace-clouddatabases-us</artifactId> <version>${jclouds.version}</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.25</version> </dependency>
  • 30. POM Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 30 mvn dependency:copy-dependencies "-DoutputDirectory=./lib"
  • 31. Logging Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 31 // This module is responsible for enabling logging Iterable<Module> modules = ImmutableSet.<Module> of(new SLF4JLoggingModule()); ComputeServiceContext context = ContextBuilder.newBuilder(provider) .credentials(username, apiKey) .modules(modules) // don't forget to add the modules to your context! .buildView(ComputeServiceContext.class); logback.xml <configuration scan="false"> … <appender name="WIREFILE" class="ch.qos.logback.core.FileAppender"> <file>target/test-data/jclouds-wire.log</file> <encoder> <Pattern>%d %-5p [%c] [%thread] %m%n</Pattern> </encoder> </appender>
  • 32. Java Project Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 32 Skeleton Project Create User Create Instance Initialize API Create Database Test Connection Cleanup
  • 33. Initialize Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 33 private final TroveApi troveApi; troveApi = ContextBuilder .newBuilder("rackspace-clouddatabases-us") .credentials(username, apiKey) .buildApi(TroveApi.class);
  • 34. Architecture Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 34 Cloud Databases Trove jclouds-database Increasing level of abstraction Provider settings: Endpoint, etc. Implementation code Abstraction s
  • 35. Architecture Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 35 Cloud Databases Trove jclouds-database Increasing level of abstraction Provider settings: Endpoint, etc. Implementation code Abstraction s Not implemented
  • 36. Initialize Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 36 private final FlavorApi flavorApi; flavorApi = troveApi.getFlavorApiForZone(ZONE);
  • 37. APIs Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 37 ➢ TroveApi ➢ FlavorApi ➢ InstanceApi ➢ DatabaseApi ➢ UserApi ➢ Utils
  • 38. Java Project Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 38 Skeleton Project Create User Create Instance Initialize API Create Database Test Connection Cleanup
  • 39. Create Instance Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 39 Flavor flavor = Iterables.getFirst(flavorApi.list(), null); … Instance instance = instanceApi.create(flavorId, size, name); flavor.getId() Volume size in GB
  • 40. Create Instance Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 40 Instance updatedInstance = awaitAvailable(instance, instanceApi);
  • 41. Create Instance Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 41 Instance updatedInstance = awaitAvailable(instance, instanceApi); Polls status, waits until ready. Will not retry by itself!
  • 42. Actual Code Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 42 InstanceApi instanceApi = api.getInstanceApiForZone(zone); for (int retries = 0; retries < 10; retries++) { Instance instance = null; try { instance = instanceApi.create(flavorId, size, name); } catch (Exception e) { Uninterruptibles.sleepUninterruptibly(15, TimeUnit.SECONDS); logger.error(Arrays.toString(e.getStackTrace())); continue; } Instance updatedInstance = awaitAvailable(instance, instanceApi); if (updatedInstance != null) { return updatedInstance; } instanceApi.delete(instance.getId()); InstancePredicates.awaitDeleted(instanceApi).apply(instance); } return null;
  • 43. Actual Code Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 43 Utils. getWorkingInstance( String zone, String name, String flavorId, int size)
  • 44. Java Project Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 44 Skeleton Project Create User Create Instance Initialize API Create Database Test Connection Cleanup
  • 45. Create Database Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 45 troveApi = ContextBuilder.newBuilder(PROVIDER) .credentials(username, apiKey) .buildApi(TroveApi.class); instanceApi = troveApi.getInstanceApiForZone(ZONE); databaseApi = troveApi .getDatabaseApiForZoneAndInstance(ZONE,getInstance().getId()); getSomeApiForXandYandZ – fairly common in jclouds
  • 46. Create Database Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 46 boolean result = databaseApi.create(NAME);
  • 47. Java Project Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 47 Skeleton Project Create User Create Instance Initialize API Create Database Test Connection Cleanup
  • 48. Create User Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 48 userApi = troveApi .getUserApiForZoneAndInstance(ZONE, instance.getId()); boolean result = userApi.create(UNAME, PASSWORD, DBNAME); User name User password Database name
  • 49. Java Project Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 49 Skeleton Project Create User Create Instance Initialize API Create Database Test Connection Cleanup
  • 50. Test Connection Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 50 Load balancer needed! CreateLoadBalancer createLB = CreateLoadBalancer. builder() .name(NAME) .protocol("MYSQL") .port(3306) .algorithm(LoadBalancer.Algorithm.RANDOM) .nodes(addNodes) .virtualIPType(VirtualIP.Type.PUBLIC) .build();
  • 51. Test Connection Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 51 loadBalancer = lbApi.create(createLB);
  • 52. Test Connection Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 52 StringBuilder connString = new StringBuilder(); connString.append("jdbc:mysql://"); connString .append(getVirtualIPv4(getLb().getVirtualIPs())); connString.append("/"); connString.append(DBNAME); connString.append("? user="); connString.append(UNAME); connString.append("&password="); connString.append(PASSWORD);
  • 53. Test Connection Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 53 Connection conn = DriverManager.getConnection(connString.toString());
  • 54. Test Connection Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 54 Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT 3+5"); rs.first(); System.out.format(" 3+5 is %s%n", rs.getInt(1));
  • 55. Going forward Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 55 ➢ jclouds examples ➢ https://github.com/jclouds/jclouds-examples ➢ More docs ➢ http://jclouds.incubator.apache.org/documentation/ ➢ http://javadocs.jclouds.cloudbees.net/ ➢ Maven alternatives? ➢ http://jclouds.incubator.apache. org/documentation/userguide/installation-guide/ ➢ Contribute! ➢ https://wiki.apache.org/jclouds/How%20to% 20Contribute
  • 56. Java Project Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 56 ➢ Linux ➢ Compile ➢ javac -classpath "lib/*:src/main/java/:src/main/resources/" src/main/java/org/jclouds/examples/rackspace/*.java ➢ Run ➢ java -classpath "lib/*:src/main/java/:src/main/resources/" org.jclouds.examples. rackspace.clouddatabases.CreateInstance username apikey
  • 57. Java Project Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 57 ➢ Windows ➢ Compile ➢ javac -classpath "lib/*;src/main/java/;src/main/resources/" src/main/java/org/jclouds/examples/rackspace/*.java ➢ Run ➢ java -classpath "lib/*;src/main/java/;src/main/resources/" org.jclouds.examples. rackspace.clouddatabases.CreateInstance username apikey
  • 58. Going forward Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 58 ➢ TroveApi ➢ Backup Extension ➢ Settings Extension ➢ Clustering ➢ Abstraction layer
  • 59. Going forward Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 59 ➢ TroveApi ➢ Backup Extension ➢ Settings Extension ➢ Clustering ➢ Abstraction layer Rackspac e Microsof t Amazo n CouchDB Salesforc e
  • 60. Going forward Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 60 ➢ TroveApi ➢ Backup Extension ➢ Settings Extension ➢ Clustering ➢ Abstraction layer Rackspac e Microsof t Amazo n CouchDB Salesforc e
  • 61. Going forward Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 61 Collaborate! http://jclouds.apache.org/ http://jclouds.apache.org/community/
  • 62. Implementing an API Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 62 Fork <link to my fork> Alternatively, fork jclouds-labs-openstack (for openstack).
  • 63. Implementing an API Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 63 On to the IDE
  • 64. Taming the Cloud Database with Apache jclouds http://rack. to/ace14db 64 Thank you! http://developer.rackspace.com sdk-support@rackspace.com Zack Shoylev Software Developer zacksh #jclouds @zackshoylev

Editor's Notes

  1. A common problem with a common solution
  2. Managed cloud