Installing Open Horizon Overview
The Open Horizon All-in-One (AIO) script is a tool for installing, restarting, upgrading, and removing all Open Horizon components. This includes the Management Hub, the anax Agent, the CLI, and example services and deployment policies. Please note that Open Horizon does not include a container or model registry, nor an automation solution like Ansible Automation Platform.
Once Open Horizon’s Management Hub is running, and at least one Agent is registered with that Hub, you will be able to automatically deploy containerized applications and ML models to the Agent’s host. This is activated by publishing, at minimum, a Service Definition file describing a microservice or distributed application, and a Deployment Policy describing the circumstances under which a service can be matched to an edge node. Once those exist, the act of publishing a deployment policy, or registering a node, will cause services and policies to be evaluated by the AgreementBot looking for potential matches. If matches are found, proposed, and accepted by all parties, the deployment process begins.
Installation summary
- This content describes the steps to deploy the following components.
- Open Horizon Exchange API.
- Open Horizon Agreement Bot (AgBot).
- Open Horizon Cloud Sync Service (CSS).
- Open Horizon FIDO Device Onboard (FDO).
- Open Horizon Secrets Manager.
Environment Variables
You may want to persist configuration variables in a file (example: mycreds.env
) or in your .bashrc
or equivalent file. Exporting the values in the current session will work for this installation only and will not make them available to future sessions.
Ensure that you are running with elevated privileges before setting variables and installing the Hub: sudo -i
export MONGO_IMAGE_TAG=4.0.6
export CSS_IMAGE_TAG=1.10.1-1577
export HZN_LISTEN_IP=132.177.125.232 # <-- use your IP address, not this one
NOTE: If you’d like to use TLS 1.3 (https) for secure services, and you’re not using macOS, set the following variables.
export HZN_TRANSPORT=https
export VAULT_DISABLE_TLS=false
Installation
IMPORTANT: At the end of a successful installation, credentials and secrets will be shown once on the screen. Administrators, please capture this information and save it for future use. There is no way to recover this.
Here is the one-liner to download and run the install script to install ONLY the Hub, not the Agent and the Examples:
curl -sSL https://raw.githubusercontent.com/open-horizon/devops/master/mgmt-hub/deploy-mgmt-hub.sh | bash -s -- -A -R -E
Flags:
-c <config-file> A config file with lines in the form variable=value that set any of the environment variables supported by this script. Takes precedence over the same variables passed in through the environment.
-A Do not install the horizon agent package. (It will still install the horizon-cli package.) Without this flag, it will install and register the horizon agent (as well as all of the management hub services).
-R Skip registering the edge node. If -A is not specified, it will install the horizon agent.
-E Skip loading the horizon example services, policies, and patterns.
-S Stop the management hub services and agent (instead of starting them). This flag is necessary instead of you simply running 'docker-compose down' because docker-compose.yml contains environment variables that must be set.
-P Purge (delete) the persistent volumes and images of the Horizon services and uninstall the Horizon agent. Can only be used with -S.
-s Start the management hub services and agent, without installing software or creating configuration. Intended to be run to restart the services and agent at some point after you have stopped them using -S. (If you want to change the configuration, run this script without any flags.)
-u Update any container whose specified version is not currently running.
-r <container> Have docker-compose restart the specified container.
-v Verbose output.
-h Show this usage.
Followup
To ensure that the user on the host can see Docker containers, run the following command:
sudo usermod -aG docker $USER
What’s Next
Follow the steps in post installation to continue setting up your new management hub.