Page tree
Skip to end of metadata
Go to start of metadata

You can create a new Role or Image from an existing cloud instance using server import. This tutorial describes how the import procedure works (to know how to access it, view this page for Images, and this one for Roles).  View our Discovery Manager documentation for guidance on importing running instances.

Step 0: Prerequisites

  1. Install a Supported OS (see list bellow).
  2. Open TCP ports 8008 through 8013, and UDP port 8014 in the corresponding Security Group or Firewall.
  3. If the Instance does not have a public IP address, forward traffic on TCP ports 8008 through 8013, and UDP port 8014 to the instance.


Only instances running in a Cloud that Scalr has access credentials for may be imported.

Step 1: Install Scalarizr on Your Server

Supported OS Versions

Operating systemSupported Versions
Ubuntu12.04 - 16.04 LTS
Debian6.x - 7.x
RHEL / CentOS

5.x - 7.x

Windows Server2008 R2 and 2012 (all releases)

Please Note: Windows 2016 is supported as of agent version 5.1.7. SUSE is not currently supported by the Scalarizr agent.  Please reach out to your Scalr sales team contact to discuss if support for this, or other OS versions, is important to you.

Installing on Linux 

Notice

 Please make sure that you install and run Scalarizr as root! Either by switching to the root user with "sudo su" or simply run all commands with the prefix "sudo".

Open a shell and execute:

PLATFORM=ec2 && curl -L https://<YOUR_SCALR_URL>/public/linux/latest/$PLATFORM/install_scalarizr.sh | sudo bash

Please Note: If you are using Hosted Scalr, <YOUR_SCALR_URL> should be my.scalr.net


Set the PLATFORM variable to the cloud platform that you are using.

ValueCloud Platform
PLATFORM=ec2Amazon EC2
PLATFORM=gceGoogle Compute Engine
PLATFORM=azureMicrosoft Azure
PLATFORM=openstackFor any OpenStack based platform, like Rackspace Open Cloud, Nebula, Cloudscaling OCS etc.
PLATFORM=cloudstackCloudStack
PLATFORM=rackspace

Rackspace Legacy Cloud

PLATFORM=vmwareVMware

Installing on Windows

Open the Administrator powershell and execute:

iex ((New-Object Net.WebClient).DownloadString('https://<YOUR_SCALR_URL>/public/windows/latest/install_scalarizr.ps1'))


Installing from a Custom Repository

If you want to use your own Scalarizr repositories, replace the the following:

  • MY_REPO_NAME with your custom repo name as defined in scalr-server.rb (Typical examples might be "latest" or "stable", but should match your custom repo)

Example:


Linux: http://<YOUR_SCALR_URL>/public/linux/MY_REPO_NAME/ec2/install_scalarizr.sh
Windows: http://<YOUR_SCALR_URL>/public/windows/MY_REPO_NAME/install_scalarizr.ps1

Step 2: Prepare the Server for Import

Prior to importing the Server, ensure that you complete common Image preparation steps required by your organization. 

Examples of such steps include:

Linux:

  • Updating all packages
  • Cleaning package manager caches
  • Remove SSH Public Keys (from authorized_keys files)
  • Remove SSH Host Keys (from /etc/ssh)
  • Clear shell history

Windows:

  • Sysprep

All:

  • Remove credentials found on the instance


Step 3: Import the Server into Scalr

  1. Click on the Scalr Logo in the top left corner.
  2. Under the Roles menu, select Create Role from non-Scalr Server.
     
  3. Choose which Cloud provider the server you want to import runs in.
  4. Give the imported server a name.
  5. Pick the region/location where the server is running.
  6. Finally pick the server you want to import and click Start Building.
     
  7. Scalr will now tell you to make sure the Scalr Agent is installed on your server. We covered this in Step 1.
  8. Run the command displayed under Launch Scalarizr (using root) to make your server ready for import. (This will be run in CMD for Windows)
  9. Click on Confirm Scalarizr Launch.
     


Scalr will establish communication with your Server.

If outbound (Scalr -> Server) communication can't be established, check your firewall rules.

When communication is established, Scalr will detect the software that is installed on your Server.

If Scalr detects software for which it has Built-in Role Automation, Scalr will offer to enable automation for this software. You can choose to enable or disable this automation.

Once you are done, click on Create Role.

Annex: Existing Servers

Be careful with already running Servers.

If the Scalarizr is already installed, you need to remove it and then re-install it.

Remove:

apt-get purge scalarizr $package

Then re-install:

apt-get install -y scalarizr $package