A SHORT INTRODUCTION TO BITNAMI WITH CLOUD & HEAT Version 1.12 2014-07-01
PAGE _ 2 TABLE OF CONTENTS 1. Introduction.... 3 2. Logging in to Cloud&Heat Dashboard... 4 2.1 Overview of Cloud&Heat Dashboard.... 4 3. Adding an SSH key to the Dashboard for Admin Access... 6 4. Launching a Bitnami VM... 8 5. Accessing the Bitnami VM.... 10 5.1 The Access Tab: A summary of VM Access Information.... 10 5.2 Accessing the Bitnami VM via ssh... 11 5.2.1 ssh Access of the Bitnami VM from Linux/Mac OSX.... 11 5.2.2 ssh Access of the Bitnami VM from Windows... 13 5.3 Accessing a Bitnami VM over Its Console... 15 5.4 Access over Swift API Endpoints... 17 6. Attaching Persistent Storage to the Bitnami VM... 18 7. Accessing the Bitnami Application... 19 8. Transferring files to and from the Bitnami VM... 20 8.1 File Transfers Using scp (secure remote copy)... 20 8.1.1 scp between a Local Linux/Mac OSX Computer and the Bitnami VM.... 20 8.1.2 scp between a Local Windows Computer and the Bitnami VM.... 21 8.2 File Transfer Using sftp (secure ftp)... 22 8.2.1 sftp between your Local Linux/Mac OSX Computer and the Bitnami VM.... 22 8.2.2 sftp between your Local Windows Computer and the Bitnami VM... 23 9. Making a Snapshot of an Instance... 24
PAGE _ 3 1. INTRODUCTION Welcome to Cloud&Heat! The purpose of this document is to help you getting started running Bitnami images with Cloud&Heat. It covers how to setup and launch a Bitnami image running in the Cloud and how to access it securely. A Bitnami image or appliance is a virtual machine (VM) with preinstalled software. After start (and changing the default password to its application) it is ready to use. We do however strongly recommend attaching persistent storage to the Bitnami VM before using the Bitnami application, since all data by default is stored in ephemeral storage. In a nutshell you have to go through the following steps to start using your Bitnami application: 1) Logging into the Cloud&Heat Dashboard (Section 2). 2) Adding an SSH key to the Cloud&Heat Dashboard for admin access (Section 3). 3) Launching a Bitnami VM (Section 4). 4) Accessing the Bitnami VM (Section 5). 5) Attaching persistent storage to the Bitnami VM (Section 6). 6) Accessing the Bitnami application (Section 7). In Section 8 we explain how to transfer files to and from the Bitnami VM. Caution: Failing to perform the step of adding the SSH key to the Cloud&Heat Dashboard before launching a Bitnami VM, will prevent logging into the VM via ssh. This problem cannot be rectified later. Caution: Any data stored directly in the Bitnami application (without attaching persistent block storage and configure the application correctly) will be lost in case the Bitnami VM is terminated. To avoid losing data stored in the ephemeral storage on the VM, we strongly recommend attaching persistent block storage to the VM (Section 6). Note: For a more complete introduction of the features in the Cloud&Heat Dashboard, please see A Short Introduction to Cloud Compute.
PAGE _ 4 2. LOGGING IN TO CLOUD&HEAT DASHBOARD The Cloud&Heat Dashboard is the initial point of access for the Cloud&Heat products and infrastructure. When you signed up for an Cloud&Heat account you received a confirmation email with, among other things, the URL for the Cloud&Heat Dashboard, your login information and project name. Please point your browser to the URL, and log in using your username and password (Figure 1). The password is the password you chose during the registration process. Figure 1: Cloud&Heat login page 2.1 Overview of Cloud&Heat Dashboard After logging in you will be at the the Cloud&Heat Dashboard Overview page (Figure 2). Please take some time to become familiar with the features of the Cloud&Heat Dashboard. Figure 2: Cloud&Heat Dashboard Overview page
PAGE _ 5 At the top of side bar on the left you can find the project name you were given at the time of signing up with Cloud&Heat. Below the project name there is a list of tabs, which we briefly explain below: CLOUD COMPUTE Overview: Provides an overview of the resource usage for the current project. Instances: Lists all (non-terminated) VM instances belonging to your project. From this page you can also: Launch new instances (Section 4) Create a snapshot from an already running instance (Section 9) By clicking on the name of the instance you can: Access the log of the VM Access the console of the VM Access information on how to access the VM Cloud Block Storage: Lists all volumes (persistent block storage) you have created, and you can attach and detach your volumes from the running VM instances. Please read Section 6 and A Short Introduction to Cloud Block Storage for more information. Images & Snapshots: Lists all images and snapshots that are available for use. To the right of each image there is a Launch button for launching the corresponding image. This creates a new instance and thus a new entry in the list of instances under the Instances tab (see above). Access & Security: Allows configuration of the security and access points of the VMs. Parts of the configuration need to be performed before starting any VM instances (see Section 3). CLOUD OBJECT STORAGE Containers: Lists all containers you have created or have access to. Please read A Short Introduction to Cloud Object Storage for more instructions on how to use containers for object storage. OTHER Bitnami Images: Lists all Bitnami Images or appliances. An appliance is a virtual machine with preinstalled software. After start (and changing the default password) it is ready to use. The list of appliances consists of all available Bitnami images, i.e., Owncloud, Jenkins, Redmine appliances, just to name a few. From the Bitnami Images tab you can launch the appliances, keep track of the ones you have running, and provide feedback as to which other appliances you would like to us to provide. Note: Cloud&Heat does not provide support for the usage of the Bitnami applications themselves.
PAGE _ 6 3. ADDING AN SSH KEY TO THE DASHBOARD FOR ADMIN ACCESS Once you have started a Bitnami VM the Bitnami application is ready to use. However, many kinds of system configuration, requires the administrator to login to the Bitnami VM via ssh and configure the application. For example, any data that is being created by the Bitnami application or uploaded to it, will be stored in ephemeral storage, and will therefore be permanently lost in case the VM is terminated. We therefore strongly recommend first configuring the Bitnami application to use persistent storage. If you decide to use persistent storage, or perform any other kind of system administration configuration of the Bitnami VM, you will have to access the Bitnami VM via ssh. Accessing the Bitnami VM via ssh requires inserting a public key into the VM at launch time, and you thus have to add your public ssh key to the Cloud&Heat Dashboard before launching the VM. This key together with the corresponding private key, a so-called keypair, allows you to securely access your instances without having to specify your password every time. Caution: It is not possible to add a keypair to an instance over the dashboard once the instance is running. Of course it is possible to later add keys via ssh, but the first key has to be inserted via the Cloud&Heat Dashboard. To add a keypair to the Cloud&Heat Dashboard, you can either create a new keypair, or import an existing one. These two possibilities are explained below in ALTERNATIVE 1A and ALTERNATIVE 1B, respectively. Only one of these two set of instructions need to be followed. ALTERNATIVE 1B is only possible to use if you already have generated a key, for example using the program keygen. You should use ALTERNATIVE 1A if you do not have an existing ssh key, or if you for some reason do not want to use it when logging in to the VMs you will launch. ALTERNATIVE 1A: CREATE A NEW KEYPAIR AND ADD IT TO THE CLOUD&HEAT DASHBOARD 1) Please select the Access & Security tab on the left in the Dashboard. 2) Select the Keypairs tab at the top of the right part of the Cloud&Heat Dashboard. All keypairs available to use in the Dashboard are listed in this list, and the first time you use the Dashboard this table will be empty. 3) Click on the Create Keypair button in the upper right corner of the table. You are presented with a dialog window. 4) Please specify a name for the key. Let us assume we call it KeypairOne. 5) Click on the Create Keypair button in the dialog window. 6) Your browser will download a file called keypairone.pem, which contains the private part of your keypair, and Cloud&Heat stores the public part of the keypair in the Dashboard. 7) KeypairOne now appears on the list of available keypairs in the table under Access & Security Keypairs.
PAGE _ 7 Note: It is recommended to store the private key (the downloaded keypairone.pem file) together with your other private keys. If you lose it, you will not be able to log into your VM. Note: If your local computer is a Windows computer, you will later need to convert the.pem key file into the.ppk format. We explain how to do this in Section 5.2. ALTERNATIVE 1B: IMPORT AN EXISTING KEYPAIR AND ADD IT TO THE CLOUD&HEAT DASHBOARD 1) If your existing keypair already is in the OpenSSH format, skip the next steps and continue with Alternative 1b Step 5). If on the other hand your key is of the.ppk format you will have to translate the public part into the OpenSSH format as follows. 2) To translate your public key into OpenSSH format, download the program Puttygen (available under www.putty.org) and start it. 3) Click Load and point Puttygen to the location of your key on your local (Windows) computer. 4) You will be presented with a window similar to the one in Figure 3. When you in Step 9) are asked to copy the content of your public key, you should copy the the characters displayed at the top of this window. Figure 3: Puttygen window with the public part of a.ppk key highlighted for copying and pasting into the Cloud&Heat Dashboard. 5) Select the Access & Security tab on the left in the Cloud&Heat Dashboard. 6) Select the Keypairs tab on the right hand side. All keypairs available to use in the Dashboard are listed in this list, and the first time you use the Dashboard this table will be empty. 7) Click the Import Keypair button at the upper right hand corner. 8) Assign a name to the keypair by entering it into the Keypair Name text field. 9) Copy and paste the content of the public part of the keypair (e.g., the content of a file called id_rsa.pub) into the Public Key text field. 10) Click on the Import Keypair button in the dialog window. 11) Your newly imported keypair is available in the list of keypairs under Access & Security Keypairs.
PAGE _ 8 4. LAUNCHING A BITNAMI VM On the Bitnami Images page under the Available Bitnami Images tab (Figure 4) in the Cloud&Heat Dashboard, you find the many Bitnami images, or appliances, that we offer. These are images with preinstalled software, e.g., OwnCloud, Gitlab, or Jenkins, ready to use. At the top of the same page, there is also the Bitnami Instances tab, which lists all Bitnami instances that are in use in the current project, and a tab Bitnami Documentation providing links to the documentation for the Bitnami images. Under the Request a Bitnami Image tab you can give us feedback regarding what other kinds of appliances you would like us to offer. Figure 4: The Bitnami Images page. To launch a Bitnami VM, please follow the following steps: 1) Go to the Available Bitnami Images tab on the Bitnami Images page in the Cloud&Heat Dashboard (Figure 4). 2) Click on the desired Bitnami image. This will bring up the Launch Bitnami Image page (Figure 5). 3) Please select an Instance Name. The instance name will be the hostname of the resulting appliance, and should therefore be chosen carefully. 4) Please select a SSH-keypair. The SSH-keypair you select will be inserted into the VM. If you ever want to ssh into your Bitnami image, for example as an administrator, inserting a key is required. Please read Section 3 for more information. 5) Please select a Flavor. The Flavor is the hardware configuration of your appliance. When you make a selection in the menu, you can see the details of the configuration for that flavor on the right hand side. We pre-select a recommended flavor that gives the best experience when using the appliance. Some appliances will not start if there is too little memory available. For example, Jenkins requires a minimum of 2 GB of memory.
PAGE _ 9 Figure 5: The Launch Bitnami Image dialog window 6) Select the Details tab at the top of the Launch Bitnami Image dialog window, and select a security group. We automatically select a security group that opens ports 22/tcp and 443/tcp. This security group is called default_22_and_443. Port 22 lets you to connect to the instance using ssh, and over the 443 port you can also access the appliance using https. If you want to change this configuration, we refer to for instructions on how to proceed. 7) When you are done with your selections, please click the Launch button in the Launch Bitnami Image dialog window. 8) The Bitnami instance that you just launched will now appear in the table on the Bitnami Instances tab, and also as an instance in the table under the main Instances tab. 9) Please remember to change the default password of your appliance. The documentation provided by Bitnami (https://wiki.bitnami.com/virtual_appliances_quick_start_guide) explains how to do this. You will also find links to the documentation under the Bitnami Documentation tab on the Bitnami Images page.
PAGE _ 10 5. ACCESSING THE BITNAMI VM Caution: Before storing data on the Bitnami VM we strongly recommend attaching persistent storage to it to avoid losing all data in case the VM terminates. To decide whether to use persistent storage please read Section 6. How to access a Bitnami VM depends on the needs of the user. If you only want to access the Bitnami application and not the VM where it is running, you can do so by pointing a browser to the correct location (see Section 7). In this section, however, we cover different ways of accessing the VM itself. In Section 5.1 we present the Access tab of an instance. This is where a summary of all access information is located. The Access tab provides the necessary commands and the current status of the accessibility of your instance. In Section 5.2 we explain in detail how to access a Bitnami VM using ssh. This allows you to perform any kind of configuration of the Bitnami VM that you might need, including attaching persistent storage to the VM, to avoid losing data stored in the ephemeral storage of the VM. After you have logged into the Bitnami VM using ssh, and reset the password for the default user, you can also use the console provided by the Cloud&Heat Dashboard to login to the VM (Section 5.3). Note: To allow access to a VM from outside of a deployment, over other ports than the ones used by ssh (22/ tcp), http (80/tcp) and https (443/tcp), you not only need to open the appropriate ports, you also have to assign a public IP address to your VM. We cover how to do this in. 5.1 The Access Tab: A summary of VM Access Information The Access tab of an instance (depicted in Figure 6) provides information on how to access this particular instance. Here you can find commands and other access information that pertain to current state of the the instance. For example you can see if you have inserted the necessary key, and opened the necessary ports to access the instance over a particular protocol. Information such as the IP addresses, default VM username, ssh commands and URLs for the instance can also be found here. To reach the Access tab, please follow the following steps: 1) Click on the Instances tab in the Cloud&Heat Dashboard. 2) Click on the name of the instance you want to access. 3) Select the Access tab on top of the resulting Instance Detail page (Figure 6).
PAGE _ 11 Figure 6: The Access tab on the Instance Detail page. 5.2 Accessing the Bitnami VM via ssh In this subsection we explain how to ssh into a Bitnami VM from your local Linux/Mac OSX computer using the OpenSSH tools (Section 5.2.1) and from a local Windows computer using the PuTTY tools (Section 5.2.2). 5.2.1 ssh Access of the Bitnami VM from Linux/Mac OSX When connecting to a Bitnami VM using ssh you need to go through the following steps (which we explain below): Section 8.2 1) Open ssh port (22/tcp). 2) Give private key the correct permissions. 3) Add private key to ssh agent. 4) Connect to VM using ssh. If one needs to access an instance often, one can simplify the commands using the ssh configuration file. How to do so is explained in Section CONFIGURING OPENSSH. In Section USING AUTOSSH AND TMUX FOR PERSIS- TENT SESSIONS we explain how to automatically reestablish the connection to an instance in case it was lost. STEP 1: OPEN SSH PORT (22/TCP) To be able to ssh to your Bitnami VM the ssh port (22/tcp) must be open. The default selection of security groups during start up opens this port. If you did not change the default selection during startup you can therefore skip this step. Otherwise follow the instructions on how to open ports in.
PAGE _ 12 STEP 2: CHANGE PERMISSIONS OF THE PRIVATE KEY To ssh into your instance you have to first make sure the permissions on the private key file are set correctly. The following two commands set the permissions of the key file and the directory where it is located and (if at all) only needs to be executed once. chmod 700 <private key directory> chmod 600 <private key> The variable <private key> is the file containing the private part of the key pair inserted into the VM when it was launched (Section 4), and <private key directory> is the directory where the private key is located. STEP 3: ADD PRIVATE KEY TO SSH-AGENT You also need to add your private key to the ssh agent. On Ubuntu you can do so by executing the following command: ssh-add <private key> An alternative is to configure OpenSSH as explained under CONFIGURING OPENSSH in this section. STEP 4: CONNECT TO VM USING SSH Now you are ready to execute the actual ssh command. This can be found under the Access tab on the Instance Details page, customized for your instance, allowing you to conveniently copy and paste the command into your terminal window. 1) Go to the Access tab for your instance (Section 5.1). 2) Select the section covering ssh access of a Linux VM from a Linux/Mac OSX computer. 3) Copy and paste the desired ssh command onto the command line and execute it. You will now be logged into the VM. CONFIGURING OPENSSH If you need to access an instance more often it might be more convenient to pre-configure ssh using the ssh config file, which normally can be found under ~/.ssh/con fig. If you add the following lines: Host MyHost User <proxy username> HostName <instance name>.<project name>.projects.cloudandheat.com Host CaH-Proxy User forward HostName ssh.<project name>.projects.cloudandheat.com
PAGE _ 13 Host MyHostOverProxy User <default VM name> HostName <private ip> ProxyCommand ssh CaH-Proxy nc -q0 <private ip> 22 to your ssh config file you can ssh to your VM using either of the following two commands: ssh MyHost ssh MyHostOverProxy The values to be used instead of the <>-variables are listed on the Access tab (Section 5.1) of the instance, and the strings MyHost and MyHostOverProxy can be chosen arbitrarily. Note: The same simplifying configuration can also be used for the scp and sftp commands (see Section 8.1 and Section 8.2). USING AUTOSSH AND TMUX FOR PERSISTENT SESSIONS To use persistent ssh connections, we recommend using AutoSSH. The AutoSSH utility keeps the connection alive and reconnects automatically in case of any interruptions. You can combine AutoSSH with Tmux (terminal multiplexer, similar to Screen) to keep your session alive even if you lose the connection to your VM. Tmux can keep the session on the VM to continue long running tasks (e.g., updating packages, archiving, etc.) until you reestablish the connection. An example (assuming the ssh-config setup described under CONFIGURING OPENSSH) would be: autossh -M 0 HyHost For persistent sessions, you should combine AutoSSH with Tmux (or Screen). The following command creates a new session or attaches to an existing session: autossh -M 0 MyHost -t tmux attach tmux new Please see the AutoSSH and Tmux documentation for more details. 5.2.2 ssh Access of the Bitnami VM from Windows To connect to your Bitnami VM from a Windows computer we recommend using the PuTTY tools (www.putty.org). PuTTY is a free implementation of Telnet and SSH for Windows which also includes an xterm terminal emulator.
PAGE _ 14 If you want to ssh into a Bitnami VM from a local Windows computer using PuTTY, you need to go through the following steps (which we explain below): 1) Open the port used for ssh (22/tcp). 2) Make sure your private key has the correct format:.ppk 3) Add your private key to Pageant. 4) Connect to the VM using PuTTY. STEP 1: OPEN SSH PORT (22/TCP) To be able to ssh to your Bitnami VM the ssh port (22/tcp) must be open. The default selection of security groups during start up opens this port. If you did not change the default selection during startup you can therefore skip this step. Otherwise follow the instructions on how to open ports in. STEP 2: CONVERT PRIVATE KEY TO.PPK FORMAT You first need to make sure your private key has the correct format. When you launched the VM you associated a keypair with the instance (Section 4), and the public part of this keypair was inserted into the VM. (If you do not know which keypair was associated with the instance, look at the instance table in the Instances tab on the Cloud&Heat Dashboard.) If the private part of the keypair is not of the putty (.ppk) format, it must first be transformed. To do so you need to run the widely available program PuTTYgen on your local Windows computer. To convert your private key into.ppk format: 1) Start PuTTYgen. 2) Load your existing private key file (e.g., keypairone.pem, which is of type SSH-2 RSA) by pressing the Load button in the resulting window. 3) Press the Save button to save your private key in the.ppk format. STEP 3: ADD PRIVATE KEY TO PAGEANT Now that the file is in the correct format, you need to use the program Pageant. This is an agent which keeps track of all your PuTTY keys. Please start Pageant and add your private key, i.e., the.ppk file, to it. STEP 4: CONNECT TO VM USING PUTTY To connect to your VM you need to: 1) Start the PuTTY program. 2) Click on Connection, SSH and then Auth in the left side bar (see Figure 7).
PAGE _ 15 Figure 7: PuTTY configuration: Allow agent forwarding must be checked, and the Private key file for authentication must be filled in. 3) On the resulting page, please check the check box Allow agent forwarding under Authentication parameters (Figure 7). 4) On the same page, please specify your Private key file for authentication (the.ppk file). 5) Click on Session at the top of the side bar on the left. 6) Enter under Hostname the username@hostname string given to you on the Access tab of your instance: 1. Go to the Access tab (see Section 5.1). 2. Find the section about SSH access, and its subsection on ssh access to a Linux VM from Windows. 3. Copy and paste the username@hostname string into the PuTTY window under Hostname. 7) Now press the Open button and you will be connected to your instance via ssh. 5.3 Accessing a Bitnami VM over Its Console The Cloud&Heat Dashboard provides a console over which you can access your Bitnami VM. You must, however, first access it using ssh and reset the password for the default user before you can log in over the console. To access the VM over the console you therefore first need to follow the instructions in Section 5.2 and reset the password of the default user.
PAGE _ 16 Figure 8: The Instances tab in the Cloud&Heat Dashboard To access the console of your VM in the Cloud&Heat Dashboard please follow these steps: 1) Click on the Instances tab in the Cloud&Heat Dashboard (shown in Figure 8). 2) Click on the name of your instance in the Instances table. This gets you to the Instance Detail page of your instance. 3) The console can be found under the Console tab at the top of the Instance Detail page (see Figure 9). Figure 9: The console of an Ubuntu instance 4) At the prompt you can log in using a username and password. The default username is given on the Access tab (Section 5.1), and as password you should use the password you selected when reseting the password for the default user after logging in to the VM via ssh. If you have not yet reset the password, you cannot log in.
PAGE _ 17 Note: If there is a problem getting the console to recognize the keyboard input please press the gray status bar at the top of the console window. Or alternatively click on the text offering to display the console only. Note: If the console is all black, the screen saver is on. Hit return to remove it. 5.4 Access over Swift API Endpoints One can also access the VMs using the Swift API endpoints. All endpoints pertaining to your project, are available under the API Access tab under the Access & Security tab in the Cloud&Heat Dashboard. Please refer to the documentation from openstack (http://api.openstack.org/api-ref.html) on how to use them.
PAGE _ 18 6. ATTACHING PERSISTENT STORAGE TO THE BITNAMI VM This section contains information which is very important to consider when using Cloud Compute. When data is written to the file system on a running VM, it accessible as long as the VM is running. But once the VM has crashed or has been terminated (as opposed to shutdown), the data is lost. This kind of storage is called ephemeral storage. There are several ways to avoid this problem. For example, one can make a habit of taking a snapshot of the running VM, every so often. These snapshots can then be used as a backup or as a checkpoint. For example, if you are installing or developing something that you know is risky, you can first make a snapshot and, if needed, do a rollback by terminating the instance and launching the snapshot. This is however only an alternative if you can allow the instance to be offline until the snapshot has been relaunched. In many situations this is not an option. Another way of solving the problem is to attach persistent block storage to the instance once it has been launched. Cloud&Heat calls the pieces of persistent block storage volumes, and the data on them is replicated three times. Volumes can be thought of as external hard drives that you can attach, detach and reattach to your VMs. You can attach a volume to many different instances (but only one at a time), and you can simultaneously attach several volumes to the same instance. Please see A Short Introduction to Cloud Block Storage for further information. Once you have attached persistent block storage to your Bitnami VM you can configure the Bitnami application to use the location of the persistent block storage when storing data. For other kinds of persistent storage that Cloud&Heat offers, we refer to A Short Introduction to Cloud Object Storage, A Short Introduction to Cyberduck with Cloud Object Storage and A Short Introduction to Duplicity with Cloud Object Storage for information.
PAGE _ 19 7. ACCESSING THE BITNAMI APPLICATION The URL to use when accessing the Bitnami application running on your Bitnami VM is shown in the section regarding web access on the Access tab of your instance (Section 5.1). The URL has been customized for your VM and can conveniently be used for copying and pasting.
PAGE _ 20 8. TRANSFERRING FILES TO AND FROM THE BITNAMI VM In this section we explain how to use scp and sftp to transfer files to and from the Bitnami VM. Depending on the Bitnami application it is running there might be other ways of transfering files on the application layer. This section is only covering the transfer of files to and from the VM itself. To use scp and sftp you need to make sure your public key was inserted into the VM and the port 22/tcp was opened. If you can ssh to your instance this will be the case, but to verify you can also perform the following two steps: 1) Make sure your public key was inserted into the instance at launch time. 1. Go to the Access tab of your instance (see Section 5.1). 2. Under the section on SSH access, make sure there is no warning regarding a missing key. 3. Verify that the private part of the keypair mentioned under Key Name has been added to your ssh client. 2) Make sure port 22/tcp is open 1. Go to the Access tab of your instance (see Section 5.1). 2. In the section on SSH access, make sure there is no warning regarding the SSH port being closed. Once you have verified the above two steps you can now follow the instructions in the following Section 8.1 and Section 8.2 for using scp and sftp, respectively. 8.1 File Transfers Using scp (secure remote copy) Depending on the operating system of your local computer, you should follow the instructions in Section 8.1.1 or Section 8.1.2. 8.1.1 scp between a Local Linux/Mac OSX Computer and the Bitnami VM On your local Linux/Mac OSX computer, make sure that the OpenSSH tools are installed, and that your private key has been added to your ssh client. To transfer a file from your local file system to the VM in the Cloud execute the following scp command in your terminal: scp -o ProxyCommand= ssh forward@ssh.<project name>.projects.cloudandheat.com nc -q0 <private ip> 22 <sou rce file> <default VM username>@<private ip>:<destination file>
PAGE _ 21 For <source file> substitute the path pointing to the file to be copied, and for <destination file> substitute the desired target location. The values to use for the other <>-variables are explained on the Access tab of the instance (Section 5.1). To transfer a file from a VM in the Cloud to your local file system, please execute the following scp command in your terminal: scp -o ProxyCommand= ssh forward@ssh.<project name>.projects.cloudandheat.com nc -q0 <private ip> 22 <default VM username>@<private ip>:<source file> <destination file> One can also use scp to copy files from one VM to another. Please see the man page of scp for more details. Note: Please see CONFIGURING OPENSSH in Section 5.2.1 for instructions on how to configure OpenSSH to simplify the above commands. Note: If you have not added your private key to your ssh client you can also add the -i <private key> flag to the above scp commads. 8.1.2 scp between a Local Windows Computer and the Bitnami VM To copy files between a Windows computer and a Bitnami VM we recommend using the program WinSCP. (This documentation is written for WinSCP 5.1.5.) A prerequisite is however that Pageant is running on your local Windows computer and that your private key has been added to it. Please see Section 5.2.2 for instructions if it is not. Figure 10: WinSCP window configuring ssh to use agent forwarding.
PAGE _ 22 To copy files to and from your Bitnami VM: 1) Start WinSCP and click the New button. 2) Then click on SSH and Authentication on the left (Figure 10). 3) Check the box Allow agent forwarding under the heading Authentication parameters. 4) Now click on Session in the side bar on the left. 5) Choose SCP as the protocol in the dropdown menu. 6) Enter under Hostname the username@hostname string given to you on the Access tab of your instance. 1. Go to the Access tab (Section 5.1). 2. Find the section regarding SSH access, and its subsection on ssh access to a Linux VM from a Windows computer. 3. Copy and paste the username@hostname string into the PuTTY window under Hostname. 7) Point WinSCP to your private key under Private key for authentication. This key should be in the.ppk format please see Section 5.2.2 for instructions on how to use PuTTYgen to convert a private key into this format if needed. 8) Now press the Login button and you will be connected to your instance via scp. A window will appear with a graphical user interface allowing you to transfer files between your local computer and the VM. Note: In case the connection fails, please make sure Pageant is running and contains your private.ppk key. 8.2 File Transfer Using sftp (secure ftp) To access your VM using sftp from a local Linux/Mac OSX computer please see Section 8.2.1 and from a local Windows computer, please see Section 8.2.2. 8.2.1 sftp between your Local Linux/Mac OSX Computer and the Bitnami VM Please make sure that the OpenSSH tools are installed on your local computer, and that your private key has been added to your ssh client. If you want to do file transfers over ftp you can execute the following sftp command in your local terminal window: sftp -o ProxyCommand= ssh forward@ssh.<project name>.projects.cloudandheat.com nc -q0 <private ip> 22 <default VM username>@<private ip> The values to use for the <>-variables are listed on the Access tab of the instance (Section 5.1). You will be presented with a command line prompt at which you can type either help or? to see all available commands. Please see the documentation of sftp for more details. Note: Please see CONFIGURING OPENSSH in Section 5.2.1 for instructions on how to configure OpenSSH to simplify the above command.
PAGE _ 23 8.2.2 sftp between your Local Windows Computer and the Bitnami VM To connect to your VM using sftp, you can follow the instructions in Section 8.1.2 with only one exception. Instead of choosing the SCP protocol you should choose SFTP from the dropdown menu. Otherwise the process is the same.
PAGE _ 24 9. MAKING A SNAPSHOT OF AN INSTANCE A snapshot is a copy of a VM instance, including all its state and data. This can for example be used as a mean of backing up ones work, or to share a setup of a VM between many users so that for example the installation of certain programs only have to be performed once. It is also a good way of having a valid state to return to in case changes you made do not work. Caution: During the process of making a snapshot the VM instance will not be responsive. To make a snapshot, please follow the following steps: 1) Go to the table of instances under the Instances tab (Figure 11) and find the instance of which you would like to make a snapshot. Figure 11: The Instances tab. 2) Then press the Create Snapshot button on the right hand side of the line corresponding to the instance. A dialog window will appear (Figure 12). 3) Specify the name you want the snapshot to have. Caution: The following step can take a long time, depending on how much data already was written to the ephemeral storage of the VM. 4) Click the Create Snapshot button in the dialog window. 5) The resulting snapshot can then be found under the Images & Snapshots tab (Figure 13) under the Project tab. The images provided by Cloud&Heat can be found under the Public tab.
PAGE _ 25 Figure 12: The Create Snapshot dialog window. Figure 13: The Images & Snapshots tab. Note: After having created a snapshot the tab is automatically changed to the Project tab. Therefore it might first look like the images provided by Cloud&Heat have disappeared. They are however available under the Public tab, just like before.