• No results found

IBM Bluemix Tutorial Connecting Eclipse to Bluemix v2.0

N/A
N/A
Protected

Academic year: 2021

Share "IBM Bluemix Tutorial Connecting Eclipse to Bluemix v2.0"

Copied!
19
0
0

Loading.... (view fulltext now)

Full text

(1)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

1

IBM Bluemix – http://ibm.biz/bluemixph

A platform where developers can act like kids in a sandbox —except this box is enterprise-grade.

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

This laboratory exercise demonstrates how to connect Eclipse to Bluemix and upload an application to Bluemix using Eclipse.

Prerequisite

Item Comment

Eclipse do the “Setting-up Laboratory Environment” (section: Installing Eclipse) laboratory exercise to install Eclipse

Bluemix Account do the “Creating a Bluemix Account” laboratory exercise if you do not have a Bluemix account

Downloading Sample WAR File

1. Go to a GitHub repository (https://github.com/ibmjstart/bluemix-java-postgresql-upload/releases)/ 2. Click the “PostgreSQLUpload.war” button to download the WAR file. Save the WAR file under

c:\bluemixtemp.

Note: There might be several versions of the WAR file. Download v1.1.

3. The PostgreSQLUpload WAR file is a sample Java web application that uses a PostgreSQL database. It asks for a text file from user and saves each line in the text file as a row in a table in the database.

Note: Once you have completed this laboratory exercise, you may use the procedure as a basis to upload and your own WAR file to Bluemix using Eclipse.

(2)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

2 Download Sample WAR File

1. Launch Eclipse. Close the “Welcome” tab.

2. In the menu, click Help->Eclipse Marketplace.

3. In the “Eclipse Marketplace” search for “cloud foundry”. Look for the item titled: "Cloud Foundry Integration for Eclipse x.x.x". Click “Update” (or “Install”) to update (or install) Cloud Foundry Integration for Eclipse.

(3)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

3 Setting-up Bluemix Server

1. In the bottom window section of Eclipse, select the Servers tab.

(4)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

4 3. In “New Server: Define a New Server” window, select Pivotal->Cloud Foundry. Click “Next”.

(5)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

5 4. In “New Server: Cloud Foundry Account” window, click “Manage Cloud”.

(6)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

6 6. In “Add and validate a Cloud URL” window, enter “Bluemix” in the name field and

https://api.ng.bluemix.net in the URL field. Click “Finish”.

(7)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

7 8. In “New Server: Cloud Foundry Account” window, make sure that the URL is “Bluemix –

https://api.ng.bluemix.net”. Enter your Bluemix username and password in the “Email” and “Password” fields, respectively. Click “Validate Account”. Once the account is validated, click “Finish”.

(8)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

8 Import the WAR file to Eclipse

(9)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

9 2. In the “Import: Select” window, select Web->WAR File. Click “Next”.

(10)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

10 3. In the “Import: WAR Import” window, click “Browse”.

(11)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

11 4. In the “Open” window, select the PostgreSQLUpload.war file under the folder c:\bluemixtemp. Click

(12)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

12 5. In the “Import: WAR Import” window, click “Finish”.

(13)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

13 Uploading the Application in Bluemix

1. In the bottom window section of Eclipse, select the Servers tab.

2. Right-click on the Bluemix server (Pivotal Cloud Foundry) and click “Connect”.

Note: If the “Connect” entry is disabled and the “Disconnect” entry is enabled, it means that Eclipse is already connected to the Bluemix server.

(14)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

14 3. Right-click on the Bluemix server (Pivotal Cloud Foundry) and click “Add and Remove”.

(15)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

15 5. In the “Add and Remove” window, click “Finish”.

Note: Aside from PostgreSQLUpload, it is possible that there are other applications listed in the right pane. These are the applications that are currently available in your Bluemix account. In the

(16)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

16 6. In the “Application: Application details” window, enter “textfileuploader-<your name>” in the Name

filed. Click “Next”.

7. In the “Application: Launch deployment” window, take note of the “Deployed URL” field. Click “Finish”.

(17)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

17 8. In the bottom window section of Eclipse, select the Console tab (if necessary). Wait for the “The

server defaultServer is ready to run a smarter planet” message to appear.

9. Open a browser. Access your uploaded application (http://textfileuploader-<you name>.mybluemix.net/)

(18)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

18 Edit Application and Redeploy in Bluemix

1. In the “Project Explorer” expand PostgreSQLUpload->Java Resources->com.ibm.bluemix.samples. Double-click PostgreSQLClient.java to open it. Scroll-down until you see the createTable() method.

2. You can modify this method to create the tables you need for your application. You can modify also other files as needed.

3. Assuming that you have done the necessary modifications, you can redeploy your application. 4. In the bottom window section of Eclipse, select the Servers tab. Expand the Bluemix server (Pivotal

Cloud Foundry).

(19)

IBM Bluemix Tutorial

Connecting Eclipse to Bluemix v2.0

19 6. In the bottom window section of Eclipse, select the Console tab (if necessary). Wait for the “The

server defaultServer is ready to run a smarter planet” message to appear.

References

Related documents

At the end (sixth column) we compute maximal primitives within this last representation using the same Generalized Linear Pro- gramming approach for segments and arcs allowing us

(You can also left-click in the open pane and select “Add a network location”) – click Next when the Add a network location window opens. • Type in a name for the new

In the Failover Cluster Manager window, in the left pane, right-click the service, point to Add a resource, click Add [resource type display name], and then click Add

Actual Data Flow Extraction of Transaction Data • BPC Staging • BPC Planning • BW Reporting • ECC Tables- FAGL-FLEXA and FLEXT Standard Cube (modified) 0FIGL_C10

%he schedule line categories C-, C), C%, and C2 are relevant for delivery the other schedule line categories are not... %he SA) System can only copy items of a sales document to

ELCOM, a.s; National Instruments; LabVIEW; servopohon; prístrojový ovládač; Modbus; TCP/IP; WorkBench;

In Windows XP, click Start, click Control Panel, click Add or Remove Programs, click on the antivirus software, and click Change/Remove.. Close any

3 In the Certificate snap-in window, select “My user account” and click “Finish”.. 4 In the Add or Remove Snap-in window select “Certificates” and click