Install the container of OpenResty Edge Node
The following documents/information need to be prepared before installation:
openresty-edge-config.*.deb, like: openresty-edge-config-0.0.1-1.or.noarch.rpm
- 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/centos/7/openresty-edge-node:1.1.0-5
3. Run Container
Create a new folder to be mounted in the container:
Generate the configuration file for Node:
LOG_SERVER_PORT with their actual contents.
# # NOTICE: please feel free to edit these configurations if necessary. # # Both [admin] section and [log_cluster] 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_cluster] # 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/18.04/openresty-edge-node:1.1.0-5
- 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
Now, the installation of the OpenResty Edge Node container is complete.
You can use the installed Edge Node.
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.
edge node service is deployed according to the above documents, openresty edge is up and running.
4. Start the OpenResty Edge service
If you have any questions, please contact us.