O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Interacting with the Oracle Cloud Java SDK with Gradle

176 visualizações

Publicada em

Interacting with the Oracle Cloud Java SDK with Gradle - Oracle Code Berlin 2019

Publicada em: Tecnologia
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Interacting with the Oracle Cloud Java SDK with Gradle

  1. 1. INTERACTING WITH THE ORACLE CLOUD JAVA SDK WITH GRADLE ANDRES ALMIRAY @AALMIRAY
  2. 2. @aalmiray
  3. 3. @aalmiray ORACLE OPEN SOURCE HTTPS://GITHUB.COM/ORACLE
  4. 4. @aalmiray
  5. 5. @aalmiray JAVA SDK FOR ORACLE CLOUD INFRASTRUCTURE HTTPS://GITHUB.COM/ORACLE/OCI-JAVA-SDK
  6. 6. @aalmiray LICENSED UNDER UNIVERSAL PERMISSIVE LICENSE V1.0 APACHE SOFTWARE LICENSE V2.0
  7. 7. @aalmiray
  8. 8. @aalmiray
  9. 9. @aalmiray FILE STRUCTURE oci-java-sdk ├── addons ├── apidocs ├── examples ├── lib ├── shaded │ ├── lib │ └── third-party └── third-party └── lib
  10. 10. @aalmiray
  11. 11. @aalmiray
  12. 12. @aalmiray CONFIGURATION
  13. 13. @aalmiray CONFIGURATION FILE https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/javasdkgett ingstarted.htm Easiest way is to create a configuration file that follows a specific format [DEFAULT] user=<user_id> tenancy=<tenancy_id> region=eu-frankfurt-1 fingerprint=<ssh_fingerprint> pass_phrase=<secret> key_file=~/.oci/oci_api_key.pem
  14. 14. @aalmiray CONFIGURATION FILE String config = “~/.oci/config”; String profile = “DEFAULT”; ConfigFileReader.ConfigFile configFile = ConfigFileReader.parse(config, profile) AuthenticationDetailsProvider provider = new ConfigFileAuthenticationDetailsProvider(configFile) ResourceSearch client = ResourceSearchClient.builder().build(provider);
  15. 15. @aalmiray
  16. 16. @aalmiray USER ID
  17. 17. @aalmiray
  18. 18. @aalmiray
  19. 19. @aalmiray TENANCY ID
  20. 20. @aalmiray
  21. 21. @aalmiray
  22. 22. @aalmiray
  23. 23. @aalmiray SSH KEY
  24. 24. @aalmiray SSH KEYS https://docs.cloud.oracle.com/iaas/Content/API/Concepts/apisigning key.htm • Provides instruction for creating an uploading SSH keys. • Service supports keys that are protected with a passphrase. • You can upload multiple keys and manage them at the OCI console.
  25. 25. @aalmiray
  26. 26. @aalmiray GRADLE PLUGIN HTTPS://GITHUB.COM/AALMIRAY/OCI-GRADLE-PLUGIN
  27. 27. @aalmiray RATIONALITY • Build tools allow us to compile, test, assemble, and deploy applications. • Gradle has excellent support for speeding up build times. • Gradle supports multiple languages and platforms, such as Java and Go. • The Oracle Cloud supports running applications in Java and Go.
  28. 28. @aalmiray
  29. 29. @aalmiray ONCE RELEASED (OLD WAY) buildscript { repositories { jcenter() gradlePluginPortal() } dependencies { classpath 'org.kordamp.gradle:oci-gradle-plugin:0.1.0' } } apply plugin: 'org.kordamp.gradle.oci'
  30. 30. @aalmiray ONCE RELEASED (NEW WAY) plugins { id 'org.kordamp.gradle.oci' version '0.1.0' }
  31. 31. @aalmiray
  32. 32. @aalmiray
  33. 33. @aalmiray
  34. 34. @aalmiray
  35. 35. BUILD-SCANS
  36. 36. @aalmiray X-RAY YOUR BUILDS • Capture build data on the go. • Analyze problems on the spot. • Deep linking enables better sharing. • Works for both Maven and Gradle.
  37. 37. @aalmiray https://scans.gradle.com/s/nde2zxpa4xb5w
  38. 38. @aalmiray https://scans.gradle.com/s/sr5y2ufwamkb2
  39. 39. @aalmiray FUTURE
  40. 40. @aalmiray ROADMAP • Provide a task for every major service in the OCI Java SDK. • Ability to configure credentials as task inputs. • Keep releases in sync when new OCI Java SDK releases come up. • Provide examples with popular microservice friendly frameworks.
  41. 41. @aalmiray OTHER POSSIBILITIES • If there’s a Gradle plugin then perhaps a Maven plugin is not that far away. • What about IDE integrations? • Or a JavaFX application/container manager paired with graphs and visualizations?
  42. 42. @aalmiray
  43. 43. @aalmiray HTTP://ANDRESALMIRAY.COM/NEWSLETTER HTTP://ANDRESALMIRAY.COM/EDITORIAL
  44. 44. THANK YOU! ANDRES ALMIRAY @AALMIRAY

×