📜 ⬆️ ⬇️

Development and testing on open technologies in the cloud on the example of Node.js, Riak, Ruby on Rails and dozens of others

image

Dear software developers and testers! We bring to your attention a series of articles on the organization of testing and developing applications in a cloud environment. This cycle includes the following articles:

  1. Free Windows Azure capabilities for MSDN subscribers: how to activate and start using?
  2. Development and testing of applications in a cloudy environment of Windows Azure
  3. Popular development and testing scenarios in the cloud
  4. Development and testing on open technologies in the cloud on the example of Node.js, Riak, Ruby on Rails and dozens of others

In this article we will look at the possibilities for developing and testing applications built on open technologies and the Linux operating system in the Windows Azure cloud. In particular, consider the work with the test environment of Riak and Erlang technologies, Node.js, Ruby on Rails.

To study the material of this article, you will need Windows Azure. A free trial for 30 days can be issued via this link . You can also activate a Windows Azure subscription within BizSpark , MSDN, or MPN .

VM Depot Community


Thanks to the open VM Depot community, several hundred ready-to-use virtual machine images on open technologies and the Linux operating system (Alt Linux, CentOS, Ubuntu, SUSE Linux and others) have already been prepared for the Windows Azure cloud platform.

Among the environments available in VM Depot are the following: LAMP, Drupal, Jenkis, Magento, MongoDB, Neo4js, Redis, WordPress, Apache Solr, Cassandra, Coppermine, Discourse, Django, DokuWiki, GitLab, Gitorious, Horde, JBoss, Jetty, Joomla , JRuby, Mantis, MediaWiki, Moodle, Node.js, OpenERP, ownCloud, phpBB, Plone, Redmine, Riak, Spree, SugarCRM, Tomcat, XOOPS and dozens of others.
')

Deploying the Node.JS environment from VM Depot


Expand the necessary environment for the development and testing of projects on open source technologies is simple via VM Depot and the Windows Azure portal .

In the Windows Azure Administration Portal, go to the “Virtual Machines” section and select the “Images” menu item. The list will list all previously created virtual machine images.

image_thumb7

Select the “Browse VM Depot” command. You will receive a list of hundreds of VM Depot virtual machines available for hosting images.

image_thumb11

Select the image you need for your development and testing environment (Node.js) and click the “Next” arrow.

image_thumb13

Specify the preferred region for hosting, select your subscription (if you have several), specify an existing one, or create a new storage account to host the virtual machine image. Click the “Finish” checkbox.

image_thumb15

The process of copying a virtual machine image from the VM Depot gallery to the location you specified (blob storage in your subscription) will be launched. After a few seconds, you will already be able to register a virtual machine based on the file being downloaded.

image54

Select your image in the list and click “Register”. You will be prompted to name the copied image in the repository and will indicate the direct address to the VHD file.

image57

Wait for the registration process to finish and begin the process of creating a virtual machine from the gallery. Now you have access to a new, just downloaded image of the Node.js virtual machine.

image_thumb17

Select the new image and click “Next”. Go through all the steps to create a virtual machine. Your development and testing environment will be created! After successfully creating a virtual machine, you can go to the control panel to configure it, monitor, control endpoint settings. For example, open a new endpoint to access the web server of the virtual machine on port 80.

image_thumb19

After that, you can follow the link of the cloud service associated with your virtual machine (URL can be seen in the administration panel) in order to start developing and testing Node.js applications in the cloud!

image_thumb21

If you take the same steps with a ready-made virtual machine built for the development and testing environment on Ruby On Rails, then in just a few minutes you can get a ready-made, pre-configured environment.

image_thumb23

Working with VM Depot from the command line Linux, OSX, Windows


Important! To run Windows Azure from the command line, please install cross-platform tools for your operating system (tutorial for Linux , for OSX , for Windows ).

Working with VM Depot from the command line is easy. Go to http://vmdepot.msopentech.com and enter in the search field the name of the technology you are interested in, for example, Riak ,

image_thumb1

In the list of search results, you can see the official image of the environment created by the author of the Riak repository ( Basho ) for placement in Windows Azure. From the information to the image, you can find out that the environment is built on the CentOS base and contains, in addition to the pre-installed Riak database, also packages with Erlang and Riak Console, which allows you to get a ready-made environment for developing and testing using Riak in a couple of clicks.

Select the Deployment Script link opposite Riak to get the script (for Linux, OSX and Windows) to automatically download the VHD file from the VM Depot gallery to your cloud storage, create a virtual machine based on the downloaded image and launch it in the Windows Azure cloud environment.

You will be prompted to agree to the terms of use of the virtual machine image.

image7

Agree to the conditions and in the next window select the necessary data center for Windows Azure (region).

image10

You will be offered a ready-made script line for running it in bash on Linux, OSX or in PowerShell on Windows. Thanks to the cross-platform command-line tools, the syntax and work with the command line for all OS are the same.

image13

Copy the script line and change the number of your personal parameters: DNS prefix, username and password, and also allow SSH access to the virtual machine. You get a command line similar to the following:

azure vm create RiakVMDepot -o vmdepot-66-3-16 -l "North Europe" vyunev mypassword –ssh

Open the command line interface (bash for Linux and OSX or PowerShell for Windows) and execute the command.

image_thumb3

The process of copying a virtual machine disk from the VM Depot gallery to your account account begins, creating a machine on the basis of the disk and starting it. The whole procedure will take a few minutes, you will be informed about the progress in the command line terminal.

image_thumb25

The created machine will be available via SSH.

image

We looked at several options for working with virtual machines in Windows Azure based on open technology for development and testing purposes. Now you know how you can easily deploy a test or work environment in the cloud for development using the Windows Azure management portal or command-line tools.

Source: https://habr.com/ru/post/192484/


All Articles