How to Use Ansible to Deploy Applications on Remote Servers
How to Use Ansible to Deploy Applications on Remote
Servers
Objectives
- Use
ansible to deploy applications on remote servers.
Prerequisites
- A VPN
account.
- A VPN
client installed on your computer.
- An ssh
client installed on your computer.
- An ssh
authentication agent running on your computer.
- An
account for the Device Management application.
- An OS
account on "fcadminprod02.fullcount.net".
- An ssh
"authorized_keys" file set up for your OS account on
fcadminprod02.fullcount.net.
- The
"Production Servers - Ed25519" and "Remote Servers"
ssh keys loaded into your ssh authentication agent.
Instructions
- Start
the VPN client on your computer and log into the VPN.
- Load
the "Central Servers" and "Remote Servers" ssh key
into the authentication agent on your computer.
- Log
into "fcadminprod02.fullcount.net" via ssh.
- Change
your directory to the directory where the
"check_remote_connections.yml" playbook is located:
# cd /srv/ansible/playbooks/groups/remote_servers
- Run
the "check_remote_connections.yml" playbook to check the status
of connections to remote servers:
# ansible-playbook check_remote_connections.yml
- Request
connections to any remote servers that have a connection status of FAILED
or, that do not have a connection. You can use the Device Management
application to do this, or edit and run the
"request_connections_to_remote_servers.sql" script.
- At
10:45pm CST, run the "deployment.yml" playbook for one
remote server:
# ansible-playbook deployment.yml -l @do-first
- Ask
the Development team to check the results.
- Be
sure to update the skip-list file with those communities that
should be skipped for the deployment. At present this includes the
community from step 7. above along with any communities that may have
migrated from on-premise to cloud-hosted and should be skipped (for
varying reasons).
- Also
keep in mind the --list-hosts flag may be used on any of the below
commands to verify the target list before executing the deployment.
- At
11:00pm CST, run the "deployment-all.yml" playbook for the
remaining remote servers:
# ansible-playbook deployment-all.yml -l @skip-list
- Copy
and paste the serial numbers of any VMs where the deployment failed into
the text file redo-list.
- Correct
the problem(s), and try the deployment again:
# ansible-playbook deployment-all.yml -l @redo-list
Related Articles
Overview of Deployment Process for Remote Servers
Overview of Deployment Process for Remote Servers Introduction The process for updating the Touchscreen and Back Office applications is known as the deployment process. The deployment process is only used for updating applications and databases on ...
Run Remote Deployment Process - Java
Remote Server Configuration This has already been completed for all existing remote servers. Java 1.8 installed Tomcat located at /srv/tomcat XE database installed and running with fc_obj_owner user Directory /home/deployment exists Database backup ...
Scheduled Jobs on Remote Servers
Scheduled Jobs on Remote Servers The tables below contain descriptions and schedules for regularly scheduled jobs on remote (i.e. at a customer's site) FullCount servers. This article does not apply to central FullCount servers (i.e. fcadmin01, ...
Copy-down Process for Remote Servers
Copy-down Process for Remote Servers Note: This is just the "copy-down" process; it does not include steps for installing or configuring the OS, database, or applications. Create a new directory on "fcadmin01.fullcount.net" with the community code ...
Remote Server Decommission Process
Remote Server Decommission Process The purpose of this document is to track the process for decommissioning a FullCount remote server as part of the transition for the client to be centrally hosted or if the client is leaving FullCount. The first ...