Installing on any OS via Docker
Prerequisites
- Create a Middleware account
- Keep logging into your account
- If you are a Windows user, please make sure Bash and curl tools are installed in your system.
Use our one-step easy installation
To proceed with the agent installation, make sure you have docker installed and running on your system. You can install docker for windows or macOS or Ubuntu.
To install an agent on a host, copy the Installation command and paste it into the command prompt. Your command will look like the following example, and it will include your API key, so you won’t need to create one.
MW_API_KEY=xxxxxxxxxxxxxxxxx TARGET=https://uid.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/docker-install.sh)"
If you are using a Windows system, you can configure the ENV variables as follows.
MW_API_KEY=xxxxxxxxxxxx TARGET=https://uid.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/docker-install.sh)"
Adding Tags to your host
If you want to add tags to your host, you can do it by adding MW_HOST_TAGS
environment variable to your installation command.
MW_HOST_TAGS=key1:value1,key2:value2,... MW_API_KEY= ....
MW_HOST_TAGS can be comma seperated key value pairs as shown above
Special Tags
Key | Description |
---|---|
name | “name” tag will be considered as an alias for the host. |
Verify the status of agent
Run the agent’s status command to verify the installation.
docker ps -a --filter ancestor=ghcr.io/middleware-labs/agent-host-go:master
A successful installation returns the status UP or Exited and in case of unsuccessful installation, the status will be blank.
Sample of successful installation in docker
Samples of unsuccessful installation in docker
Uninstall the Middleware agent
To uninstall the middleware agent, please use the following command.
docker stop `docker ps -a -q --filter ancestor=ghcr.io/middleware-labs/agent-host-go:master`
docker rm `docker ps -a -q --filter ancestor=ghcr.io/middleware-labs/agent-host-go:master`
Was this page helpful?