How-To Deploy a New Server - AWS

Preparation

  1. Determine and document server requirements.
  2. Create a new server configuration file (.ini file) and check into Git (see this /wiki/spaces/EN/pages/5898406). See this template for a quick setup. Also see the SSHLDAP documentation for details on adding servers to existing SSHLDAP Fabric layers.
  3. Create new servers on AWS. Make sure that the new servers all have password-less sudo access for the user that is going to run the script.
  4. Make sure that you create a DNS entry in Route 53 for the newly created servers. Otherwise, determine the AWS DNS names and update the server configuration ini file from Step #2.
  5. [Optional] Create the password files for the deployer script input parameters.
    1. OpenDJ file when creating a new OpenDJ server - contains 2 passwords. The first line of the file contains the Directory Manager (cn=Directory Manager), the second line contains the Admin User password.
    2. The OpenDJ password is only needed when deploying a new OpenDJ server or when deploying schemas that require directory access, or a new SSHLDAP fabric configuration.
    3. Otherwise. if a password is required you will be prompted for it.
  6. Perform the following commands on a DevOps server of a central server that has access to all the newly created AWS servers:
## Fetch the deploy script on the DevOps server
git archive --remote=git@bitbucket.org:zibernetics/zinet.git master:playbooks/shell deploy-servers.sh | tar -x
 
## Fetch the server configuration ini file, where myorganization if your Git user account, 
## config-repo is the Git repo, branch is the Git branch of the repo, root is the root project in the repo to check out.
## and my-core-servers is the server config ini file created for the deployment in Step 2 and 4
git archive --remote=git@bitbucket.$myorganization/$config-repo.git $branch:$config-$root/config $my-core-servers.ini | tar -x


## Run the deploy script
./deploy-servers.sh -i $my-core-servers.ini -r ~/repo -Y .pins 2>&1  | tee install.log

Test access to your environment after the deploy-server.sh script finishes.