How to create a virtual machine, deploy rails application and also deploying web application in Azure Cloud services.

How to create a virtual machine, deploy rails application and also deploying web application in Azure Cloud services.
1. Login in to Azure Portal and create unbuntu box,


Related Links*   — Rails tutorials

Save all images

How to create a database and user/password and also grant all permission for particular user/database

➜ ~ sudo su – postgres
[sudo] password for selva:
postgres@selva-host:~$ psql
psql (9.5.7)
Type “help” for help.





CREATE USER gokul WITH PASSWORD ‘gokul123@’;

CREATE DATABASE freshgrc_development;

GRANT ALL PRIVILEGES ON DATABASE freshgrc_development to gokul;

sudo apt-get install libpq-dev



We have to establish a prioritization system that works, is fair, and takes into account true business need and IT capability.









3 points each Affects > 50% of users Areas outside of the company will be affected negatively OR positively Interferes with core business functions OR loss or potential loss of mission critical data Event underway and it cannot be stopped or changed AND immediate action could resolve the issue
2 points each Affects >10 but < 50 users OR no more than 50% of all users The company will be affected negatively OR positively Interferes with non-core activities OR functions that do not affect the entire company Event scheduled to occur but enough time remains to respond without impacting event
1 point each Affects < 10 users OR no more than 25% of all users Business unit will be affected negatively OR positively Interferes with normal completion of work OR tasks are more difficult but not impossible to complete Event can be postponed OR is far enough away in time to allow response without loss of productivity
0 points each Affects a single user Goodwill unchanged Interferes with recreational OR non-business related use No scheduled completion time is required and normal work can continue until responding

Figure 1. Priority Scoring Matrix

We then go back to the priority codes (Critical, High, Medium, Low) and establish a value range for each. In this case a score of 12 means Critical; 9-11 means High; 5-8 means Medium; and 0-4 means Low. You will also need to establish the timeframes within which each priority code will occur. Such a matrix would look like figure 2. Following our example with a score of 6, this incident would receive a priority of Medium:




Timeframes (Response / Resolution)



An immediate and sustained effort using all available resources until resolved. On-call procedures activated, vendor support invoked. Immediate action/resolution as soon as possible.



Technicians respond immediately, assess the situation, may interrupt other staff working low or medium priority jobs for assistance. Action within 1 hour/resolution within 1 business day.



Respond using standard procedures and operating within normal supervisory management structures. Action within 2 hours/resolution within 2 business days.



Respond using standard operating procedures as time allows. Action within 2 business days/resolution within 10 business days.

Figure 2. Priority Assignment Matrix

Difference between RCA & Problem Management – In Summary:

  • The RCA process is focused on Problem Identification and Impact Reporting
  • ITIL Problem Management is focused on Problem Identification and Elimination


Priority = Urgency x Impact

Impact = Effort upon the Business

Urgency = Extent to which the resolution can bear delay.

ITIL Definition: Urgency. Urgency: measure of business criticality of an Incident, Problem or Change where there is an effect upon business deadlines. The urgency reflects the time available for repair or avoidance before the impact is felt by the business.


RE: Incident VS Security Incident

ITIL doesn’t formally define a security incident but does say it’s what you get when a threat (which can be anything that disrupts a business process or has negative impact on the business) materialises.

A normal incident (what I call a ‘service incident’) on the other hand is an unexpected event which causes loss of service or a degradation in quality of a service.

Service incidents and security incidents are similar in that you want to recognise them quickly, dispatch them to the right team quickly and resolve them as quickly as possible in accordance with specific procedures (which include “incident models”).

Security incidents are likely to have a significant/large number of incident models defined, e.g., how to deal with loss/theft of a laptop, mis-use of privileged accounts, violation of computer usage policies, breach of confidential information etc. and it’s vital these procedures are correctly followed. The more serious security incidents may involve HR, Legal counsel, communications and even law inforcement or regulatory agencies.  Impacts can range from the very minor to serious loss of earnings, reputational damage, etc.

Of course, service incidents can also result in serious losses, reputational damage etc. so for the same reasons you want to recognise, dispatch and resolve in a timely manner following the correct procedures.

By their nature, the details of security incidents are often confidential so it’s important to track these in a system that can enforce the confidentiality (you could adapt an existing ITSM ticketing system for this, although typically sites use a different system for security incidents where they can implement stronger controls over access to the ticket history.

The ISACA site has some interesting article on security incidents that are worth a read.



Sno Field Hidden Phase Description Description/Notes
1 Incident ID     Unique ID Of the Incident  
2 Incident Title     Short Incident Name  
3 Request Type Y   Hide this Required at later point if service request is also handled
4 Incident Date of Filing     Date of Recording the Incident  
5 Incident Time of Filing     Time of Recording the Incident  
6 Incident Reported By     Person who reported the Incident  
7 Incident Recorded By     Person who recorded the Incident  
8 Mode of Reporting     Mode of Reporting (Email, Phone)  
9 Incident Summary     Incident Description in Details Get Details about the Incident
  Incident Date of Occurrence     Date of Occurrence Get Details of
  Incident Time of Occurrence     Time of Occurrence  
10 Incident Status N   New – When Created Recorded, Assigned, Escalated, Resolved, Closed.Root Cause Identified. Notification to be sent
11 Incident Category     Category of Operation/Functions  
12 Incident Sub Category     Sub Category under Incident Category  
13 Incident Assignee     Person who is assigned this incident Selected based on Incident Category & Sub Category
14 Incident Priority     This information has to be given by concerned Business Team Incident Manager can re-assign Priority
15 Incident Urgency     This information has to be given by concerned Business Team Incident Manager can re-assign Urgency
16 Incident Impact     This information has to be given by concerned Business Team Incident Manager can re-assign Urgency
20 Root Cause Identified     Yes/No – Default No  
21 Root Cause Description     Description of Root Cause  
22 Incident Response Procedure     This has to be provided by the Operations Team  
23 Response Notification Sent     Whether Response Notification Sent Notification to be sent stating who it is assigned to
24 Resolution Notification Sent     Whether Response Notification Sent Notification to be sent stating the resolution done and reportee has to verify if resolved
25 Resolution Acknowledgement received     Whether Acknowledgement received for resolution  
26 Related Asset ID     Related Asset ID based on Root Cause  
27 Related Control ID     Related Asset ID based on Root Cause  
28 Related Risk ID     Related Asset ID based on Root Cause

Download all gems dependencies

Thats exactly the problem I had.
After searching around a while I found a Solution who works using Bundler

Getting Gem with Dependencies:

  • Create a new Folder with a File named Gemfile in it.
  • Write a Source and the Gem you want to have the dependencys for into the File
  • Bsp:

    source “
    gem ‘rails’, ‘3.2.1’

  • Open a Commandline at this Folder an Execute: bundle install
  • This should download and install all Dependencys
  • Execute the Command bundle list if you wanna see it
  • Execute the Command bundle package
  • This should create the Directory Structure vendor/cache
  • Inside the cache Directory are now all the Dependencys you need for your gem

Install Gem on Machine without internet connection:

How to set up endpoints on a classic Windows virtual machine in Azure


How to set up endpoints on a classic Windows virtual machine in Azure

All Windows virtual machines that you create in Azure using the classic deployment model can automatically communicate over a private network channel with other virtual machines in the same cloud service or virtual network. However, computers on the Internet or other virtual networks require endpoints to direct the inbound network traffic to a virtual machine. This article is also available for Linux virtual machines.


Azure has two different deployment models for creating and working with resources: Resource Manager and Classic. This article covers using the Classic deployment model. Microsoft recommends that most new deployments use the Resource Manager model.

In the Resource Manager deployment model, endpoints are configured using Network Security Groups (NSGs). For more information, see Allow external access to your VM using the Azure portal.

When you create a Windows virtual machine in the Azure portal, common endpoints like those for Remote Desktop and Windows PowerShell Remoting are typically created for you automatically. You can configure additional endpoints while creating the virtual machine or afterwards as needed.

Each endpoint has a public port and a private port:

  • The public port is used by the Azure load balancer to listen for incoming traffic to the virtual machine from the Internet.
  • The private port is used by the virtual machine to listen for incoming traffic, typically destined to an application or service running on the virtual machine.

Default values for the IP protocol and TCP or UDP ports for well-known network protocols are provided when you create endpoints with the Azure portal. For custom endpoints, you’ll need to specify the correct IP protocol (TCP or UDP) and the public and private ports. To distribute incoming traffic randomly across multiple virtual machines, you’ll need to create a load-balanced set consisting of multiple endpoints.

After you create an endpoint, you can use an access control list (ACL) to define rules that permit or deny the incoming traffic to the public port of the endpoint based on its source IP address. However, if the virtual machine is in an Azure virtual network, you should use network security groups instead. For details, see About network security groups.


Firewall configuration for Azure virtual machines is done automatically for ports associated with remote connectivity endpoints that Azure sets up automatically. For ports specified for all other endpoints, no configuration is done automatically to the firewall of the virtual machine. When you create an endpoint for the virtual machine, you’ll need to ensure that the firewall of the virtual machine also allows the traffic for the protocol and private port corresponding to the endpoint configuration. To configure the firewall, see the documentation or on-line help for the operating system running on the virtual machine.

Create an endpoint

  1. If you haven’t already done so, sign in to the Azure portal.
  2. Click Virtual Machines, and then click the name of the virtual machine that you want to configure.
  3. Click Endpoints in the Settings group. The Endpoints page lists all the current endpoints for the virtual machine. (This example is a Windows VM. A Linux VM will by default show an endpoint for SSH.)


  4. In the command bar above the endpoint entries, click Add.
  5. On the Add endpoint page, type a name for the endpoint in Name.
  6. In Protocol, choose either TCP or UDP.
  7. In Public Port, type the port number for the incoming traffic from the Internet. In Private Port, type the port number on which the virtual machine is listening. These port numbers can be different. Ensure that the firewall on the virtual machine has been configured to allow the traffic corresponding to the protocol (in step 6) and private port.
  8. Click Ok.

The new endpoint will be listed on the Endpoints page.

Endpoint creation successful

Manage the ACL on an endpoint

To define the set of computers that can send traffic, the ACL on an endpoint can restrict traffic based upon source IP address. Follow these steps to add, modify, or remove an ACL on an endpoint.


If the endpoint is part of a load-balanced set, any changes you make to the ACL on an endpoint are applied to all endpoints in the set.

If the virtual machine is in an Azure virtual network, we recommend network security groups instead of ACLs. For details, see About network security groups.

  1. If you haven’t already done so, sign in to the Azure portal.
  2. Click Virtual Machines, and then click the name of the virtual machine that you want to configure.
  3. Click Endpoints. From the list, select the appropriate endpoint. The ACL list is at the bottom of the page.

    Specify ACL details

  4. Use rows in the list to add, delete, or edit rules for an ACL and change their order. The Remote Subnetvalue is an IP address range for incoming traffic from the Internet that the Azure load balancer uses to permit or deny the traffic based on its source IP address. Be sure to specify the IP address range in CIDR format, also known as address prefix format. An example is

    New ACL entry

You can use rules to allow only traffic from specific computers corresponding to your computers on the Internet or to deny traffic from specific, known address ranges.

The rules are evaluated in order starting with the first rule and ending with the last rule. This means that rules should be ordered from least restrictive to most restrictive. For examples and more information, see What is a Network Access Control List.