Enterprise Recon Cloud 2.12.0
How To Manage Master Server
This section covers the following topics:
Overview
Managing the Master Server to perform tasks is done using the Master Server console. In Enterprise Recon Cloud, the Master Server runs as a docker image within the EC2 instance. To be able to perform tasks for the Master Server, you must:
Connect to the EC2 Instance
Secure SHell (SSH) access to the Master Server is disabled by default. To enable SSH access, connect to the EC2 instance by running the command:
# Where 'ec2-user' is the default username,
#'<directory>' is the full path of where the private key (.pem file) is saved,
# and '<instance-hostname-or-ip>' is either the public DNS name
# or the IP address of the EC2 instance.
# Syntax: ssh -i <directory> ec2-user@<instance-hostname-or-ip>
ssh -i /tmp/sshkey.pem ec2-user@12.345.678.9
Access the Master Server Console
To access the Master Server console, run
/home/ec2-user/er-cloud.sh console
Use the Master Server console only to perform described tasks and basic commands. Using the Master Server console to perform tasks outside the scope of this guide may cause ER Cloud to fail.
Perform Basic Commands
Check Master Server Version
To check your Master Server version and build number, run:
rpm -qa er2-master
This displays the installed Master Server package name, version, build number and architecture:
# Displays output in the format of
# <Master Server package name>-<version>-<build number>.<architecture>
er2-master-2.x.xx-xxxxxxxxxxxxxxx.el8.x86_64
Start, Stop and Restart the Master Server
Perform the appropriate command:
-
To start the Master Server, run:
/home/ec2-user/er-cloud.sh start_master_server
-
To stop the Master Server, run:
/home/ec2-user/er-cloud.sh stop_master_server
-
To restart the Master Server, run:
/home/ec2-user/er-cloud.sh restart_master_server
You can also perform the commands below to start, stop, or restart both the Master Server and the cloud Proxy Agents:
-
To start both the Master Server and the cloud Agents, run:
/home/ec2-user/er-cloud.sh start
-
To stop both the Master Server and the cloud Agents, run:
/home/ec2-user/er-cloud.sh stop
-
To restart both the Master Server and the cloud Agents, run:
/home/ec2-user/er-cloud.sh restart
Set Time Zone
# SSH to the EC2 instance
ssh -i <path-to-the-sshkey.pem-file> ec2-user@<IP address or public DNS name>
# List all time zones
timedatectl --no-pager list-timezones
# Set the system time zone (e.g. Asia/Singapore)
sudo timedatectl set-timezone <time-zone-region>
# Restart the containers to apply the change
/home/ec2-user/er-cloud.sh restart
Check Free Disk Space
To check how much free disk space there is on your Master Server, run:
df -h
This displays information about disk usage on the Master Server's local disks, and on mounted file systems:
Filesystem Size Used Avail Use% Mounted on
/dev/dm-2 15G 1.8G 13G 13% /
tmpfs 246M 0 246M 0% /dev/shm
/dev/sda1 239M 54M 172M 24% /boot
Shut Down the Master Server
To shut down the Master Server, run:
shutdown -h now
The shutdown command can also be run with these options:
Command | Description |
---|---|
shutdown -h +<time> | Schedules the system to shut down in <time> number of minutes.
shutdown -h +1 shuts down the system in 1 minute.
|
shutdown -h hh:mm | Schedules the system to shut down at hh:mm, where hh:mm is in a 24-hour clock format.
shutdown -h 13:30 shuts down the system at 1:30 pm.
|
shutdown -h +<time> This is a shutdown message. | Schedules the system to shut down in <time> number of minutes, and sends the message: "This is a shutdown message" to all users, warning them of the impending shutdown.
shutdown -h +1 Shutting down in 1 minute shuts down the system in 1 minute and sends the message "Shutting down in 1 minute." to all users.
|
shutdown -r now | Restarts the system. You can also run reboot to restart the system. The above scheduling parameters (For example: +<time> Shutdown message) also work with shutdown -r. |
Start, Stop and Restart Cloud Agents
To start, stop, and/or restart pre-configured cloud Proxy Agents, perform the appropriate command:
-
To start all cloud Agents, run:
/home/ec2-user/er-cloud.sh start_proxy_agents
-
To stop all cloud Agents, run:
/home/ec2-user/er-cloud.sh stop_proxy_agents
-
To restart all cloud Agents, run:
/home/ec2-user/er-cloud.sh restart_proxy_agents