Mais conteúdo relacionado Semelhante a Introduction to Apache jclouds at NYJavaSIG (20) Mais de Everett Toews (18) Introduction to Apache jclouds at NYJavaSIG1. Introduction to
Apache jclouds
Everett Toews
Developer Advocate
@everett_toews
NYJavaSIG
August 20, 2014 @ 6:00 pm
16. “To produce the ubiquitous Open Source
Cloud Computing platform that will meet
the needs of public and private clouds
regardless of size, by being simple to
implement and massively scalable.”
36. “We work with you to create the infrastructure
that performs best for your business, built on
open-source technologies and fueled by our
unparalleled expertise—so you can move at
the speed your business and your customers
demand.”
40. Rackspace
• Load Balancers
• Auto Scale
• Monitoring
• DNS
• Big Data
• Backup
56. jclouds
Apache jclouds is an open source
multi-cloud toolkit for the Java
platform that gives you the freedom to
create applications that are portable
across clouds while giving you full
control to use cloud-specific features.
72. Code
Context
1 NovaApi novaApi = ContextBuilder.newBuilder("openstack-nova")
Defaults
Top Level API
2 .credentials("myUsername", "myPassword")
3 .endpoint("http://myOpenStack.com:5000/v2.0/")
4 .buildApi(NovaApi.class);
Resource API
5 ServerApi serverApi = novaApi.getServerApi("region");
6 ServerCreated server = serverApi.create("serverName", "imageId", "flavorId");
Resource Web Service Call (cloud-specific)
74. Code
1 NovaApi novaApi = ContextBuilder.newBuilder("rackspace-cloudservers-us”)
2 .credentials("myUsername", "myPassword")
3 .buildApi(NovaApi.class);
4 ServerApi serverApi = novaApi.getServerApi("region");
Provider:
• Endpoint
• Overrides
• Configuration
5 ServerCreated server = serverApi.create("serverName", "imageId", "flavorId");
76. Code
1 ComputeServiceContext context = ContextBuilder.newBuilder("rack-cs-us")
2 .credentials("myUsername", "myPassword")
3 .buildView(ComputeServiceContext.class);
4 ComputeService computeService = context.getComputeService();
Portable Abstraction (View)
77. Code
1 Template template = computeService.templateBuilder()
2 .locationId("locationId")
3 .osFamily(OsFamily.UBUNTU)
4 .minRam(2048)
5 .options(inboundPorts(22, 80))
6 .build();
Web Service Call (portable)
7 computeService.createNodesInGroup("groupName", 3, template);
Notas do Editor Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in Why did Rackspace utilize cross-cloud toolkits? Lock-on, not lock-in