An Overview of Codenvy in 7 Steps- Part 1

Tyler Jewell
Codenvy Blog
Published in
5 min readNov 10, 2014

--

Getting Started Bloglong1

This is the first of several posts over the coming weeks that will help you get the most out of Codenvy. Topics include:

This post builds a Hello World application to overview the main features of Codenvy. If you’d like to read ahead, visit our documentation site that includes detailed explanations and examples for all these topics and more.

0. Accessing Codenvy

To begin either log in to your account, create a new account, or use an anonymous Java Factory (Please note that some portions of the overview won’t be available in anonymous mode).

1. User Dashboard

If you entered through our homepage factory you are using Codenvy as an anonymous user and don’t have access to the User Dashboard — you can sign-up for a free or paid account to see this or skip to the next section. The User Dashboard is your control panel for Codenvy where you can manage your projects, control your running environments, invite developers to collaborate on projects and manage your account and subscriptions. After hitting the Create New Project, button on the left of the user Dashboard, you’ll be brought to the Project Wizard. Under SamplesHello World select Spring and provide a name for the project. When you are done, hit Create to open the sample project in the browser editor.

GS 1-1 New Project

2. The Codenvy Browser Editor

The browser editor allows you to edit, build, run and debug your project. The UI will be familiar to many with a project explorer on the left, code editing window on the right and a status / control area at the bottom where you can interact with builders, runners, view events and access the terminal. At the very bottom is a status bar that shows your subscription level, amount of RAM used and available and type of runners & builders.

GS 1-2 Editor

For compiled languages Codenvy first performs a build of the app when it opens. You can see the Build Success and build information from our project’s Maven builder in the Builder tab.

3. Running the Project

For our first run we’ll use the default runner that is most easily accessed by the Play button on the toolbar.

GS 1-3 Play Button

When we run, the Event panel at the bottom of the screen flips over to the Runner panel where we can see the output of our runner as the container is built (you’ll see a series of [Docker] outputs for example as the container and contents of the running environment are built), and then as our application is loaded. In this case we’re running with Tomcat 7. You can view the Dockerfile at any point by hitting the View Recipe button (follow up posts will discuss Dockerfiles and recipes).

GS 1-4 Runner Panel

When the application is ready its URL will be displayed in the Runner panel header. Click the App URL to open a new browser window for the running application. This is where you can interact with the application. When you’re ready, close the Hello World’s browser window.

Note that although you closed the app’s browser window, the application is still running. Codenvy environments are often shared and used for collaborative development, testing and support so we leave the environment running until you stop it or the timeout for your subscription level is reached.

Before we stop the application, select the Terminal tab in the Runner panel. This gives you root access to the running container. Try several unix commands like ls –al to see a list of files in your current directory.

When you’re ready, stop the application by hitting the Stop button.

GS 1-5 Stop Button

4. Editing the Code

In the project explorer open up the Java package and the GreetingControler.java class. Replace Hello on line 19 with Bonjour or anything else you like. Save the file by hitting [Ctrl-S] or [Cmd-S].

GS 1-6 Editing Change

5. Running with a Different Runner

Now let’s try running with a different runner. Select Run > Custom Run, this will bring up the Custom Run wizard.

GS 1-7 Custom Run

You will see Project and System environments:

  • System environments are provided by Codenvy and coded to certain project types (Java web, Javascript, PHP, C++, etc…) and are shared with all Codenvy users
  • Project environments are provided by the project owner, packaged with the project and shared with anyone who has access to the project

If you have a premium account with 2GB+ you can run larger environments like Java application servers. Otherwise you can skip to section 6: Cloning & Sharing.

Select Java > Web > TomEE and 512MB RAM and Run. Once you see the [Docker] commands end open the Terminal tab as you did before and types ls -al at the prompt. You will see a tomee directory showing that we’re now using TomEE.

GS 1-8 Custom Run Panel

Finally, let’s look at the Runners section of the User Dashboard. Navigate back to your User Dashboard by selecting the < button on the left beneath the File menu.

This will bring you back to the User Dashboard where you can choose Runners from the menu and see that your app is still running. From here you can track how long any process has been running, open a Terminal into the container, restart or shutdown the app or jump back into the IDE. Select Open IDE.

GS 1-10 User Dashboard

Once back in the IDE, stop the application by hitting the Stop button in the Runner panel at the bottom.

In our next post, we’ll cover Git interactions, Cloning and Sharing.

Community

We hope that you’re getting joy using Codenvy. We love engaging with you through any of our channels.

@codenvyhq | @codenvystatus | Google Support Group | Feature Vote | irc: #codenvy

--

--

MD @ Dell Tech Capital. BOD @ NS1, Orion Labs. Prev: CEO @ WSO2, CEO @ Codenvy (acq. by RHT). Invest @ Sauce Labs, Cloudant, ZeroTurnaround, InfoQ, Sourcegraph.