Skip to main content

Add a Gateway Instance

The first and most important thing that you need to do after signing up is to add a gateway instance (Apache APISIX) and let it connect to API7 Cloud.

As a demo, we'll use Cloud CLI to deploy an APISIX instance on Docker, so before you go ahead, make sure:

  1. Docker is installed on your machine.
  2. Your machine is connected to the Internet.
tip

See the guide How to Deploy Apache APISIX if you want to learn more details.

First, please refer to Cloud CLI Installation to install the Cloud CLI.

After installing Cloud CLI, please log in to API7 Cloud and create a Personal Access Token. You can enter the Personal Access Token page on API7 Cloud by clicking on the "Personal Access Token" button in the account drop-down box.

Enter Personal Access Token Page

Then click on the "Generate a new token" button.

Personal Access Token

After you click on it, API7 Cloud will show a popup window, and you need to fill in the token notes (what's this token for?) and the expiration time (how long will this token be valid?).

Generate a new token

Click on the "Create Token" button. API7 Cloud will redirect you to the Personal Access Token page, and your new token will be there.

Personal Access Token Value

danger

As API7 Cloud prompts, you have only one chance to see the token, so please make sure you save it correctly!

Copy the token from the page and configure it for Cloud CLI by running the following command:

cloud-cli configure

It'll prompt you to enter the token.

Now let's try to deploy an APISIX instance on Docker.

cloud-cli deploy docker  \
--apisix-image apache/apisix:2.15.0-centos \
--name my-apisix \
--docker-run-arg --detach \
--docker-run-arg --rm

You'll see the output below if the deployment was successful. The Container ID and APISIX ID might differ due to the random generation mechanism.

Congratulations! Your APISIX instance was deployed successfully
Container ID: 0904c39c2551
APISIX ID: 19cb8b57-6436-40bd-8dc2-d3571a356b86

And now, let's check the Gateway Instances table, and you'll see the APISIX instance you just deployed.

APISIX instance on the table

If you want to stop the APISIX instance, just run the command below:

cloud-cli stop docker --name my-apisix

Well done! You've just deployed an APISIX instance on Docker; it'll receive the configurations from API7 Cloud and report the status to API7 Cloud. Now, let's try to create a Service on API7 Cloud to drive your APISIX instance.

Next

Create the HTTPBIN Service.


API7.ai Logo

API Management for Modern Architectures with Edge, API Gateway, Kubernetes, and Service Mesh.

Product

API7 Cloud

SOC2 Type IIISO 27001HIPAAGDPRRed Herring

Copyright © APISEVEN PTE. LTD 2019 – 2024. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the

Apache Software Foundation