Help:Addresses

From Wikitech
Jump to navigation Jump to search

The Public IP address list allows projectadmins the ability to manage public IP address(es) assigned to their project(s). Note that if all you want to do is expose a web service, you should just use Special:NovaProxy. That also gives you https for free. Only request a public ip if you need to expose non http / https endpoints.

Request a Public IP address

Public IP addresses are not automatically available to projects. If you want to make use of a Public IP address, make a request in #wikimedia-labs connect, or on the wikimedia-labs mailing list. The request should describe what you plan to do with the IP address.

Manage Public IP address(es)

The Public IP address list, allows you to manage your project(s) IP address(es) :

  1. In the left menu of Wikimedia Labs, under “Labs Projectadmins”, click “Manage Addresses”.
  2. Toggle the Project and Server sections.
  3. If an IP address has been previously allocated to one of your projects, you will see it listed with details about its instance allocation and actions that can be performed on it.
  4. If no IP address is listed, and you want to use an IP address that was assigned to your project via a request, continue with Allocate IP below.

Note: there is no web page at the moment that lists unallocated IP addresses for your project(s).

Allocate IP

If no public IP address has ever been assigned to one of your projects, you will not see a listing of IP addresses available to your projects. If you have made a Request for a Public IP address and received a positive response, you can allocate the IP address to one of your projects.

  1. Click on the “Allocate IP” link.
  2. You will see a message similar to “Are you sure you would like to allocate a new public IP address in project your_project_name?”
  3. Click on “Submit”
  4. If you receive a message such as “Failed to allocate new public IP address.”, then a Public IP address is not available for you to allocate and you will need to Request a Public IP address
  5. Otherwise you should see a message similar to “Allocated new public IP address: 333.22.333.333” with a link “Back to address list”.

Release IP

Releasing an IP address allows you to assign it to another project on the same Region Server and will keep the IP address available to your projects indefinitely; it will not be released for another project other than your own. *(need Wikimedia Labs Projectadmin verification on this).

  1. From the Public IP address list, click on the action “Release IP” in the corresponding row of the IP address you want to release.
  2. You will see a message similar to “Are you sure you would like to release 333.22.333.333?”.
  3. Click on the “confirm” button.
  4. You will see a link, “Back to address list”.

Associate IP

Once you have allocated a Public IP address to one of your projects you need to associate it with one of your instances.

  1. From the Public IP address list, click on the action “Associate IP” in the corresponding row as the IP address you want to assign to one of your instances.
  2. You will be brought to a web page with a drop-down menu showing the instances available that can be associate with the IP address.
  3. Select an instance name from the drop-down menu.
  4. Click on the “Submit” button.
  5. You should receive a message similar to “Successfully associated 333.22.333.333 with instance ID 88888888-4444-4444-4444-121212121212.” and a link “Back to address list”.

Disassociate IP

  • Removes the link between the IP address and instance name.
  • Frees the IP address for assignment to any of your other projects on the same Regional Server.
  1. From the Public IP address list, click on the action “Disassociate IP” in the corresponding row of the IP address you want to disassociate.
  2. You should see a message similar to “Are you sure you would like to disassociate 333.22.333.333?”.
  3. Click on the “Submit” button.
  4. You should see a message similar to “Successfully disassociated 208.80.153.148.” with a link “Back to address list”.

Reassociate IP

  • Removes the link between the IP address and the instance name.
  • Allows you to associate the IP address with another instance in the same project.
  1. From the Public IP address list, click on the action “Disassociate IP” in the corresponding row of the IP address you want to disassociate.
  2. You will be brought to a web page with a drop-down menu showing the instances available that can be associate with the IP address.
  3. Select an instance name from the drop-down menu.
  4. Click on the “Submit” button.
  5. You should receive a message similar to “Successfully associated 333.22.333.333 with instance ID 88888888-4444-4444-4444-121212121212.” and a link “Back to address list”.

Add host name

You can insert an unlimited number of dns records for one public IP, however, you will need to make sure that the hosts file and apache configuration are set-up to properly handle the multiple dns records pointing to your instance.

  1. From the Public IP address list, click on the action “Add host name” in the corresponding row of the IP address you want to add a host name to.
  2. You will be brought to a web page with a text box for a “Host name” and a drop-down menu for a DNS domain.
  3. Enter the “Host name” you’d like to use.
    This will become the sub-domain for the instance, e.g., http://your_host_name.wmflabs.org
  4. Select a DNS domain; wmflabs is recommended for security reasons.
  5. Click on the “Submit” button.
  6. You should see a message similar to “Successfully added your_host_name entry for IP address 333.22.333.333.” and a link “Back to address list”.

Configure the instance for Internet access

Take the new host name as a subdomain that has an A record pointed to the public IP that you have, then do the necessary to edit your apache configuration to show a website using the host name. Please check that you've associated the IP to an instance before asking why things aren't working at #wikimedia-labs.

  1. Make sure firewall rules have port 80 open or other agreed upon port for web browsing.
  2. Make sure apache config is properly setup -- default apache site will be used if no apache config or host changes are made in the instance.

Use the IP

To actually use the IP, you might have to add rules to the security group. The default policy is to drop all packets, so those rules add ACCEPT rules for services you need. To accept from anybody, use the CIDR range 0.0.0.0/0.