Privacera Manager Command Line#
Privacera Manager is a Linux shell script. (privacera-manager.sh). It functions as a:
Configuration controller: handing installations and updates;
Vault: handling encryption-storage and decryption-retrieval of secure configuration properties;
Service module controller: starting, stopping, and reporting status for Privacera service modules;
Privacera Manager is normally installed to, and runs from, "~/privacera/privacera-manager/".
cd ~/privacera/privacera-manager/ ./privacera-manager.sh update
As a configuration controller,
- Parses the custom property files
- Deploys the software components
- Starts Privacera services
You should have passwordless SSH to run the update command. If you do not have passwordless SSH, then configure the password in a file to establish a SSH connection. This is shown below:
cd ~/privacera/privacera-manager vi config/privacera.inventory
Add the following at the end of the line:
[servers] privacera ansible_connection=local OS_USER=privacera ansible_sudo_pass=$YOURPASSWORD
Privacera Manager Vault#
As a secure property vault, it can be used to securely encrypt, store, decrypt, and retrieve properties, such as passwords, or secure access tokens that are otherwise entered, insecurely, into individual configuration files. Privacera Vault usage is optional.
Property value defined in the vault will override property values stored defined in other custom-vars/vars.*.yml files. Best practice is to delete sensitive variables from other custom-vars/vars.*.yml files as they are added to the Privacera Manager vault.
Optionally, after Privacera Manager is installed, run './privacera-manager.sh vault'
It will prompt for a password. Provide strong password using both alphanumeric and special characters such as 'Str0ngP@ssw0rd'
The vault will open to display sample variables. Uncomment and set variables or add new variables. e.g SSL_DEFAULT_PASSWORD: “S0mOtherStr0ngP@ssw0rd”.
Save and exit.
Re-run './privacera-manager.sh vault' to reopen, and reset or add additional sensitive property values at any point.
Note: File '~/privacera/privacera-manager/config/custom-vars/vars.privacera-secrets.yml' stores this encrypted data. Do not delete this file.
As a Services controller, Privacera Manager can be used to start, stop, and report status for the following Privacera modules:
|stop||Stop all Privacera services.||./privacera-manager.sh stop|
|stop <service>||Stop service associated Docker containers or Kubernetes pods||./privacera-manager.sh stop <service>|
|restart||Restart all Privacera services||./privacera-manager.sh restart|
|restart <service>||Restart service associated Docker containers or Kubernetes pods||./privacera-manager.sh restart <service>|
|status||Report status of all Privacera service||./privacera-manager.sh status|
|status <service>||Report status of service associated Docker containers or Kubernetes pods||./privacera-manager.sh status <service>|
|setup||Generates all the installation configurations files and scripts in the docker/output folder before the pods/containers are initialized.||./privacera-manager.sh setup|
|delete||Deletes the Maria DB container/pod. You can use this command when you want to move to an external database such as PostgreSQL or MySQL, instead of using the internal Maria DB.||./privacera-manager.sh delete mariadb|
Verify YAML Config Files#
When working with YAML configuration files in the
custom-vars folder, you can verify if they are syntactically correct. Before running the install/update, you can choose to run the check command to analyze the YAML files for any formatting/syntax errors.
The following is the command to run the check command. It will analyze the file
config/vars.privacera.yml, and all the files under the
yaml_check command does not show all the errors existing in the YAML files, but a few common errors such as any extra white line, missing single/double quotes and so on. To troubleshoot the errors, see Common Errors/Warnings in YAML Config Files.
Remove Privacera from an Instance/Virtual Machine#
Run the following commands to stop the Privacera services and remove Privacera configuration files and folders completely from an instance or virtual machine. This is applicable only to Docker-based environments.
cd ~/privacera/dockers ./privacera_services down cd ~/ sudo rm -rf privacera