Help:Cloud VPS Instances: Difference between revisions

From Wikitech
Content deleted Content added
Dan-nl (talk | contribs)
→‎Managing Instances: clarifying that puppet is not required
Hydriz (talk | contribs)
→‎Puppet information: not true if you need to deploy to live sites
Line 22: Line 22:


==== Puppet information ====
==== Puppet information ====
Wikimedia Labs uses [http://docs.puppetlabs.com/#puppetpuppet Puppet] to manage Instance configurations, however there is no requirement to use Puppet to configure your Instances; you can also use [https://help.ubuntu.com/12.04/serverguide/apt-get.html Ubuntu’s apt-get] originally developed by [http://www.debian.org/doc/manuals/apt-howto/ debian] or other package manager if you wish.
Wikimedia Labs uses [http://docs.puppetlabs.com/#puppetpuppet Puppet] to manage instance configurations, however there is no requirement to use Puppet to configure your Instances; you can also use [https://help.ubuntu.com/12.04/serverguide/apt-get.html Ubuntu’s apt-get] originally developed by [http://www.debian.org/doc/manuals/apt-howto/ debian] or other package manager if you wish. Do understand that if you are developing something that will eventually get deployed to Wikimedia servers, you ''have'' to use puppet to configure it.


In order to include Puppet configurations, when creating the instance, you need to toggle the ''“Expand”'' link to show available options, however, it is usually best not to set these options at instance creation time as these options can cause an instance build failure. You can select Puppet configurations after instance creation using the ''“Configure”'' link of the instance.
In order to include Puppet configurations, when creating the instance, you need to toggle the ''“Expand”'' link to show available options, however, it is usually best not to set these options at instance creation time as these options can cause an instance build failure. You can select Puppet configurations after instance creation using the ''“Configure”'' link of the instance.

Revision as of 09:32, 4 October 2012

This page contains information how to set up an instance. Instances are not projects: see Help:Terminology and the full list of projects with their members.

Creating an instance

You must have Sys Admin rights in order to create and manage instances. Contact the current project owners if you wish to request Sys Admin rights for a given project.

Add Instance link

  1. Make sure you are properly logged in.
    nb: if you see a permissions error at any time, try logging out and then back in.
  2. In the left menu look for the sub-menu group “Labs Sysadmins” and click on it to open it.
  3. Click on the menu item “Manage Instances”.
  4. You will be brought to a page that shows an “Instance list”, which is a summary of the projects and instances you are able to manage.
    nb: if you do not see any instances or projects, make sure the “project filter” is open and select the projects you wish to view.
  5. Under the projects listed, you will see the names of the server groups that you can create instances on for your project; most likely, region pmtpa.
    nb: regions are groups of servers, server farms, etc. usually located in the same geographical area.[1]
  6. Click on the “Add instance” link.

Initial Settings

Instance information

  1. Instance name
    The name of your instance will also be its hostname. Important: it’s a good idea to name your instance using the following format project-instance, e.g, project name is myproject, instance is coolbot, so the resulting instance name would be myproject-coolbot
  2. Instance type
    The drop-down contains a range of possible instance types indicating RAM, number of CPUs, and Hard Drive space. Further information on Instance Types can be found on the openstack website.
  3. Availability zone
    Leave it as nova; nb: this may only be available to admins - i couldn’t see it.
  4. Image type
    The drop-down contains a list of system images available with your most likely choice at the top. Generally the distro version (lucid, natty, oneric, etc) When in doubt, use the default.
  5. Security groups
    A list of available security groups for your instance is listed; select any security groups you think you need for this instance; it is usually best to make sure that at least the default security group is selected.
    nb: if the Netadmin for the project has not created any additional security groups, besides the default group, you will only see the default security group listed; also, before creating your instance, make sure you read the information on Security groups - you cannot add or remove security groups assigned to an instance after it has been created. while security groups can never be added or removed from an instance, after the instance has been created, you can add and remove firewall rules from the already defined and assigned security groups, so, it is usually best to create your necessary security groups before creating your instance, assign those to the instance, and then add/remove rules from those groups as necessary after instance creation.

Puppet information

Wikimedia Labs uses Puppet to manage instance configurations, however there is no requirement to use Puppet to configure your Instances; you can also use Ubuntu’s apt-get originally developed by debian or other package manager if you wish. Do understand that if you are developing something that will eventually get deployed to Wikimedia servers, you have to use puppet to configure it.

In order to include Puppet configurations, when creating the instance, you need to toggle the “Expand” link to show available options, however, it is usually best not to set these options at instance creation time as these options can cause an instance build failure. You can select Puppet configurations after instance creation using the “Configure” link of the instance.

Build the Instance

When happy with the configuration, click on the “submit” button.

The instance will be created, but it will be a short while until the instance is ready to be logged into. You should receive an email when the instance is ready (note: this is broken, currently, for all non-wikimedia email addresses). You can check the process of the build by viewing the instance's console log. When the puppet run finishes, it is ready to be logged into.

Managing Instances

Once your instance is created it's listed in the instance list. You can perform various operations with instance there.

  • Configure: configure the instance using a Puppet configuration listed or you can also use apt-get from the command line in the Instance
  • Delete: Delete the instance together with logical volume where OS is stored (your home is preserved)
  • Get console output
  • Reboot: reboot the instance

Configuring Instances

If you click configure, you get a list of various puppet class already available for your instance.

To add specific puppet classes to your project and make them available to your instances, use the Manage Puppet Groups special page.

To make changes to the puppet classes available to your instance, check out the puppet configs following the instructions in the help page on Git. Once you submit the change, you can either run puppet by running

sudo puppetd -tv

or just wait until puppet run there. If you encounter a problem running the sudo command above, then you might need be added as a sudo user for the project you're working on. Any user with the sysadmin rule for the project can do that -- see Help:Sudo_Policies for more information.

Nagios

All instances are monitored using nagios, it's available on [2], it's possible that once you create an instance it's not immediately configured there, we are now trying to find out some solution to automatize its configuration.