CloudBees Toolkit for Eclipse


Published on

CloudBees Toolkit for Eclipse

Published in: Technology, Education
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • The cloudbees-web.xml file provides extra configuration for your application to setup your application ID, datasources binding and extra configuration parameters. Like the standard Servlet Application web.xml, this file should be located in your application's WEB-INF directory.
  • Applications parameters and datasources can be easily managed using the cloudbees-web.xml file, but sometimes it is preferable not to have all parameters embedded directly in the application archive file for various reasons:separation of code and sensitive information such as credentialsfor open source project to avoid bundling parameters into public repositoriesfor continuous integration setupfor security reason (encryption of sensitive information)The CloudBees SDK "bees config" commands provide a way to externalize configuration configuration parameters from the application archive file. Configuration parameters can be attached to a specific application ID (application parameters) or an account (global parameters). Global parameters are available to all applications of the account.Configuration parameters will automatically be made available to your application at runtime as system properties or as defined in your cloudbees-web.xml. Application configuration parameters will overwrite global configuration parameters when defined with the same name.Let's take a look at an example where database configuration credentials are defined as configuration parametersdb.username and db.password and referenced in the cloudbees-web.xml file. Context parameter values can also reference configuration parameters (i.e. accessKey parameter using the “key” parameter)The three bees commands above did the following:Set a global parameter (key) for all applications on the the accountSet an app parameter (db.username) for the app with the ID "myappid"Deploy a WAR file using the ID, myappid, and set the db.password configuration parameterAfter running these command, the app (myappid) would be deployed to CloudBees and the three configuration parameters will be made available at runtime for the app to use.Accessing parameters from your appBy default, all configuration parameters are available to an application as Java System Properties.  Additionally, if your parameters are defined in the cloudbees-web.xml file using the ${param_name} syntax, then the parameter values will be injected into your application's configuration as appropriate at runtime.  For example, if you place the parameter as the value for a <context-param> element, it will be available to the application using ServletContext.getParameter(), etc.If your application is deployed for multiple environments (ex: dev vs. test vs. prod), you can combine the use of these configuration parameters with the <environment> element in your cloudbees-web.xml file to switch around which values are injected into your app based on the environment flags it is deployed with.
  • CloudBees Toolkit for Eclipse

    1. 1. CloudBees Toolkit for Eclipse – Java PaaS http://clean-clouds.com
    2. 2. CloudBees Eclipse Plugin
    3. 3. CloudBees Eclipse Plugin
    4. 4. CloudBees Eclipse Toolkit
    5. 5. Validate your CloudBees Account
    6. 6. CloudBees Perspective in Eclipse
    7. 7. Repository as a Service
    8. 8. Create a New Repository
    9. 9.  What if like to be notified when someone commits to your repository?  HTML Format  3 Mail IDs Configure: Email Notifications
    10. 10. Commit or Push Notification in HTML Format
    11. 11. Sample CloudBees Project & SVN
    12. 12. Create New CloudBees Project
    13. 13. SVN Repository: Configuration Error
    14. 14.  Go to Window -> Preferences How to ADD SVN Repository in Eclipse?
    15. 15. How to ADD SVN Repository in Eclipse?
    16. 16. How to ADD SVN Repository in Eclipse?
    17. 17. How to ADD SVN Repository in Eclipse?
    18. 18. CloudBees Project
    19. 19.  <?xml version="1.0"?> <cloudbees-web-app xmlns=""> <!-- Application ID (formatted CB_ACCOUNT/APPNAME) --> <appid>APP_ID</appid> <!-- Extra context parameters --> <context-param> <param-name>PARAM_NAME</param-name> <param-value>PARAM_VALUE</param-value> </context-param> <!-- DataSources (use names refererenced via <resource-ref> in WEB-INF/web.xml) --> <resource name="jdbc/DATASOURCE_NAME" auth="Container" type="javax.sql.DataSource"> <param name="username" value="DB_USER" /> <param name="password" value="DB_PASS" /> <param name="url" value="jdbc:cloudbees://DB_NAME" /> </resource> </cloudbees-web-app> CloudBees Web Configuration File
    20. 20.  <?xml version="1.0"?> <cloudbees-web-app xmlns=""> <!-- context parameter --> <context-param> <param-name>accessKey</param-name> <param-value>${key}</param-value> </context-param> <!-- Database resource --> <resource name="jdbc/myDB" auth="Container" type="javax.sql.DataSource"> <param name="username" value="${db.username}"/> <param name="password" value="${db.password}"/> <param name="url" value="jdbc:mysql://ec2.xyy:3306/myDB"/> </resource> </cloudbees-web-app>  An application deployed with this cloudbees-web.xml file is expecting to have three configuration parameters available at runtime (key, db.username, db.password)  # bees config:set key=r434133edt # bees config:set -a myappid db.username=mydbuser # bees app:deploy -a myappid -P db.password=mydbpassword build/myapp.war Configuration Parameters
    21. 21. Simple Project with Single Servlet
    22. 22. RUN@local
    23. 23. RUN@local
    24. 24. RUN@cloud
    25. 25. Commit Project to CloudBees SVN
    26. 26. Commit Project to CloudBees SVN
    27. 27. Compare Files
    28. 28. Download with Linkedin Username/Password
    29. 29. Download with Linkedin Username/Password
    30. 30. Download with Linkedin Username/Password
    31. 31. Download with Linkedin Username/Password
    32. 32. Download with Linkedin Username/Password
    33. 33.