Install the container of OpenResty Edge Node
The following documents/information need to be prepared before installation:
- Configuration package:
openresty-edge-VERSION.tar.gz, download from Download Center.
- Your Admin’s IP and port, corresponding to
- Your Log Server’s IP and port, corresponding to
- Image Address, corresponding to
2. Download Image
- Login Registry
sudo docker login --username=REGISTRY_USERNAME registry.openresty.com # enter password: REGISTRY_PASSWORD
- Download Image
docker pull DOCKER_IMAGE # example: docker pull registry.openresty.com/edge/ubuntu/20.04/openresty-edge-node:22.6.1
3. Run Container
Create a new folder to be mounted in the container:
Generate the configuration file for Edge Node:
LOG_SERVER_PORT with their actual contents.
# # NOTICE: please feel free to edit these configurations if necessary. # # Both [admin] section and [log_server] section need to be configured below. # [admin] # admin server host, default: host = "ADMIN_HOST" port = "ADMIN_PORT" # Another admin server host when you have deployed two admin servers. # The node will choose one of them randomly. # And node will retry another server automatically when one server is down. # It is optional, please ignore it when you only deployed one admin. # host2 = "" [log_server] # log server host, default: host = "LOG_SERVER_HOST" port = "LOG_SERVER_PORT"
- Run Container
It is often desirable that after a container is destroyed, other Node containers can inherit this container’s configuration, so we mount the Node’s data directory.
Assume that the absolute path to custom/ is
/root/custom/. Assume that the local data path is
docker run -d -p 80:80 -p 443:443 --name openresty-edge-node \ -v /root/custom/:/usr/local/oredge-node/custom/ \ -v /root/node1-data/:/usr/local/oredge-node/data/ \ DOCKER_IMAGE # example: docker run -d -p 80:80 -p 443:443 --name openresty-edge-node \ -v /root/custom/:/usr/local/oredge-node/custom/ \ -v /root/node1-data/:/usr/local/oredge-node/data/ \ registry.openresty.com/edge/ubuntu/20.04/openresty-edge-node:22.6.1
- If an error occurs, the container can be stopped and deleted using the following command:
docker stop openresty-edge-node docker rm openresty-edge-node
The installation of OpenResty Edge Node is now complete.
4. Getting Started
Login to Admin website:
If you are trying Edge, the URL and account password for Admin will be sent with your trial email.
For the trial version, admin is deployed on our machines, while for the future purchase of the full version, we will provide the installation package for self-deployment.
After login, go to the gateway clusters tab, there you will see the join request from the newly deployed node.
According to the information in the join request, confirm that it is your own node, and then click approve.
The procedure of approval is to add a new node to a gateway cluster. So before you approve, you need to create a cluster on the GUI, and then you can choose when you approve.
If you have any questions, please contact us.