Getting Started

Step 4 - Deploying to the Edge

In this guide we'll show you how to deploy your gateway to the edge, at over 200 data-centers around the world. The act of deployment creates new environments and it's worth familiarizing yourself with how environments work.

In this tutorial we'll show the default workflow via GitHub, but note that we also support GitLab, BitBucket (enterprise plan only) and custom CI/CD.

To follow this tutorial you'll need

1/ Authorize to GitHub#

Before you begin, it is best to create an empty GitHub Repo to use for your Zuplo project. Click the button below to go to GitHub and create a new repository. Select the organization where you'd like to create the repository.

Create GitHub Repo

Next, go to your project in the Zuplo portal and open to the Settings tab (1), then select Source Control (2). Control. If your project isn't already connected to GitHub click the Connect to GitHub button and follow the auth flow. You'll need to grant permissions for any GitHub organizations you want to work with.

Next, a dialog will open asking you to authorize Zuplo. Click the Authorize Zuplo button.

GitHub Permissions

The permission "Act on your behalf" sounds a bit scary - however, this is a standard GitHub permission and by default Zuplo can't actually do anything with this. In order to perform actions on your behalf you must grant Zuplo access to a specific repository (shown in the next steps.).

You can read more about this permission on GitHub's docs.

After you have connected the GitHub app, it needs to be granted permission to edit a repository. If this is your first time connecting Zuplo, you will be immediately asked to select a GitHub Org to install Zuplo. Select the org you want to use.

Next, you will be asked to select the repositories that you want Zuplo to access. The easiest thing is to just select All Repositories, but if you want fine-grain control, you can select a specific repo.

Existing Installation

The next step is only if you already have Zuplo installed in a GitHub org and need to add another organization.

If you weren't prompted to select a GitHub org, it is likely that you are already a member of an an account that has authorized Zuplo. To add Zuplo to a new organization click Add GitHub Account in the org picker list.

2/ Connect GitHub to your Project#

With your GitHub App configured, you can now return to the Zuplo portal. In the Source Control settings you should now see a list of GitHub repositories - if you just created your project, it should be listed on the top. If not, just type the name in the search box. Once you have located your repository click the Connect button.

After the connection succeeds you will see a link to your GitHub repository.

Click the link to return to GitHub. You should see a green check next to the commit hash (1). When you hover your mouse over that you'll see the Zuplo deployment was successful. Click Details (2) to open the deployment info.

On the deployment page, you will see Deployment has Completed!! and below that is the link to your new environment.

3/ Deploy another environment#

Zuplo makes it easy for teams to collaborate by allowing teams to create many preview environments. To create a new environment, simple go to your repo in GitHub and create a new branch.

Let's create a branch called development

Create new branch

Wait about 20s and head back to Zuplo - you should see a new entry in the environment dropdown called development.

4/ Push a change to 'development'#

Let's make a simple change to our working-copy environment. Let's do something simple like capitalize the Summary field from 'Get all todos' to 'Get All Todos'. It doesn't really matter what the change is.

Change of Summary

Save your changes. Click the GitHub button at bottom left and choose Commit & Push. Enter a description of your change in the dialog that pops up:

Commit Dialog

Click Commit & Push will create a new temporary branch in GitHub with a name zup-.... On the next dialog, click Create Pull Request.

Create PR

This will navigate you to the screen in GitHub that allows you to create a Pull Request. Change the base branch to development (since that is the environment we want to update first). Click Create pull request.

GitHub PR

When ready, click Merge pull request

Merge PR

Once merged, you'll want to delete that temporary branch.

Delete branch

The successful merge will trigger a rebuild and deployment of development with your change. You can check this by choosing the environment development in Zuplo and navigating to the readonly Route Designer.

Readonly view of changes

This shows how you can use widely recognized GitOps practices to manage how code flows through your environments using Pull Requests and protected branches.

Troubleshooting#

I don't see my repository listed in Zuplo project settings.

  • Make sure you've granted access to the project with the Zuplo GitHub App, you can check that configuration here

I've connected my Zuplo project to a GitHub repository but get access errors when running commits, pulls or try to open a pull request.

  • If you are the owner of the project, make sure you've granted access to the project with the Zuplo GitHub App, you can check that configuration here
  • If this Zuplo project was shared with you, make sure you are a GitHub collaborator. This can be verified by going to the GitHub repository > Settings > Collaborators section. You'll need admin permissions to the repository.
  • If the GitHub repository has been renamed or moved to a different organization, try disconnecting and reconnecting to it. You can do this by going to your Zuplo project's settings > Source Control section
Previous
Step 3 - Rate Limiting