Skip to end of metadata
Go to start of metadata

Set Up a New Management Instance

Xandr support creates an initial management instance for you so you can start working with the Xandr system.  If you'd like to create a new management instance for any reason, log in to your current management instance and follow these steps:

1. If you need to, reserve a new server for the new management instance.  You can choose any server type you like (e.g. weba, webc, etc.); it is common to choose the same server type as you reserved for your initial management instance:

manage-server list -a --username <USERNAME>
manage-server reserve -s <server ID from list above> --username <USERNAME>

2. Launch a new instance of whatever size you like.  As always, include units for memory and disk space:

manage-instance launch -S public -p images/centos5-base/centos-current.fs.tgz -n <New instance name> -s <SERVER_ID> -c 1 -m 256mb -d 20gb --username <USERNAME>

You may want to also use the "--authorized-keys" or "-k" option to place a file with your public key(s) to /root/.ssh/authorized_keys.  Note that you should include your default public key (the one you sent us in your initial customer questionnaire for your original management instance) in the uploaded file; otherwise it will not work with the --authorized keys option.  Please refer to Key Pair Authentication for details on "--authorized-keys".

Note also

that you have to authenticate yourself in order to use the API/CLI commands.  Authentication can be done either by specifying your login in the command line or by placing your credentials into the CLI configuration file 'rpc.cfg'.  Refer to API and CLI Documentation for details.

3. Once this new instance has started, use "manage-instance list" to get its IP address.  Record this IP.

4. Note that you don't need to copy your CLI certificates / keys to the new management instance anymore in order to use the CLI tools.  We now (since API release 0.177) use username–password authentication scheme instead of certificate and key pair.  More details are in our API documentation section.

5. Now, you can log in to your new instance.

You can do it from your initial management instance:

ssh -i userkey.pem root@<new instance IP>

Alternatively, you can log out of the initial management instance and log in to the new instance from the outside (be sure that you have your private SSH key in the appropriate place).

ssh root@<new instance IP>

Note that if you plan to delete the original management instance you MUST log in to the new one from your local computer.

6. Now, configure the RPM repository and install Xandr's CLI and all dependencies:

Create a plain text file:

# vi /etc/yum.repos.d/Centos-appnexus.repo

with the following contents:

# Appnexus repository

name=CentOS-$releasever - Appnexus
# yum install perl-RPC-XML perl-Config-General perl-Text-ASCIITable perl-Crypt-SSLeay perl-Data-Validate-IP perl-Term-ReadKey perl-File-Slurp appnexus-cli

That's it—you've just created another management instance.

7. Make sure your new management instance works with these commands:

manage-server list -r --username <USERNAME>
manage-instance list --username <USERNAME>

8. Copy all data and other items you may have placed on the initial management instance to the new one using scp.

9. If you like, you could delete the initial management instance and release its server:

manage-instance delete -i DC:INSTANCE_ID --username <USERNAME>
manage-server release -s DC:SERVER_ID --username <USERNAME>

Note: manage-instance delete totally destroys instances in the running, offline, and failed states; it also erases all data.  Please use this command with extreme care.

You can use the rest of the resources on the management server for other instances.

Further reading

More info on yum repository files can be found on the following Wiki page: Yum Repository Configuration Files

  • No labels