CloudBees Toolkit for Eclipse

  • 502 views
Uploaded on

CloudBees Toolkit for Eclipse

CloudBees Toolkit for Eclipse

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
502
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
12
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    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.

Transcript

  • 1. CloudBees Toolkit for Eclipse – Java PaaS http://clean-clouds.comhttp://clean-clouds.com
  • 2. CloudBees Eclipse Pluginhttp://clean-clouds.com
  • 3. CloudBees Eclipse Pluginhttp://clean-clouds.com
  • 4. CloudBees Eclipse Toolkithttp://clean-clouds.com
  • 5. Validate your CloudBees Accounthttp://clean-clouds.com
  • 6. CloudBees Perspective in Eclipsehttp://clean-clouds.com
  • 7. Repository as a Servicehttp://clean-clouds.com
  • 8. Create a New Repositoryhttp://clean-clouds.com
  • 9.  What if like to be notified when someone commits to your repository?  HTML Format  3 Mail IDs Configure: Email Notificationshttp://clean-clouds.com
  • 10. Commit or Push Notification in HTML Formathttp://clean-clouds.com
  • 11. Sample CloudBees Project & SVNhttp://clean-clouds.com
  • 12. Create New CloudBees Projecthttp://clean-clouds.com
  • 13. SVN Repository: Configuration Errorhttp://clean-clouds.com
  • 14.  Go to Window -> Preferences How to ADD SVN Repository in Eclipse?http://clean-clouds.com
  • 15. How to ADD SVN Repository in Eclipse?http://clean-clouds.com
  • 16. How to ADD SVN Repository in Eclipse?http://clean-clouds.com
  • 17. How to ADD SVN Repository in Eclipse?http://clean-clouds.com
  • 18. CloudBees Projecthttp://clean-clouds.com
  • 19.  <?xml version="1.0"?> <cloudbees-web-app xmlns="http://www.cloudbees.com/xml/webapp/1"> <!-- 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 Filehttp://clean-clouds.com
  • 20.  <?xml version="1.0"?> <cloudbees-web-app xmlns="http://www.cloudbees.com/xml/webapp/1"> <!-- 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 Parametershttp://clean-clouds.com
  • 21. Simple Project with Single Servlethttp://clean-clouds.com
  • 22. RUN@localhttp://clean-clouds.com
  • 23. RUN@localhttp://clean-clouds.com
  • 24. RUN@cloudhttp://clean-clouds.com
  • 25. Commit Project to CloudBees SVNhttp://clean-clouds.com
  • 26. Commit Project to CloudBees SVNhttp://clean-clouds.com
  • 27. Compare Fileshttp://clean-clouds.com
  • 28. Download with Linkedin Username/Password http://clean-clouds.com
  • 29. Download with Linkedin Username/Password http://clean-clouds.com
  • 30. Download with Linkedin Username/Password http://clean-clouds.com
  • 31. Download with Linkedin Username/Password http://clean-clouds.com
  • 32. Download with Linkedin Username/Password http://clean-clouds.com
  • 33. http://clean-clouds.com