API Maker

The backend engine for the AI era

Chapters

What you will learn

  • Versions: every change reviewed before it runs
  • Health and statistics of every server
  • A server: files, terminal and logs
  • The data server, and moving with the data
  • How the data is copied, and every byte checked
  • Data from your laptop to production
  • PM2 or systemd, uninstall or forget a server
  • Your settings in one file
In the docsRun on your computer
Transcript1136 words · click a time to play from there

Intro

Here is day two with Launchpad. You get upgrades that say what they will do, and the health of every server. You get a terminal, files, and logs, without typing SSH by hand. You move data between servers, and bring data from your laptop to production.

Day two, the usual way

After the first deployment, there is usually an upgrade that nobody dares to start. A terminal is open on every server, just to see how it is doing. A database must move, and is copied by hand while it still writes. And data from a laptop goes to production with a dump and a prayer. With Launchpad, every version change is reviewed before it runs. Health, statistics, files, terminals, and logs of every server are in one window.

A move copies the data while it runs, then copies the last changes. And the file from Local mode imports straight into production. In this video: versions, health, a server, its files, its terminal, and its logs, moving with the data, data from your laptop to production, PM2 or systemd, removing or forgetting a server, and your settings in one file.

Versions

Open the Versions tab of production. It lists everything it runs, with two versions. One is what its servers run since the last deployment, and the other is what you want. Pick a newer MongoDB here. Nothing changes on the servers yet. It waits for the next deployment, the tab counts it, and the line says what the upgrade does. What cannot be picked is greyed out, with the reason.

No database goes back on its data. PostgreSQL only moves inside its major version. Review changes opens the review. It shows which version each service leaves, for which version, and what restarts. API Maker is installed next to the one that runs, then switched, one server at a time. For a reverse proxy, its configuration is checked with the new release first, then its container is replaced. MongoDB moves one major version at a time, one member at a time, and its feature compatibility version moves on afterwards.

And for a database that the new version cannot open, you export it, add it again on that version, and import the file.

Health

Health checks every server: its disk, memory, and load, its services, the replication, the network, the certificates, and the addresses of every reverse proxy, from this computer. Each check says what it found. Here, API Maker is run by systemd, with its memory, its answer, and the databases it reaches on the data server.

A server

Here is a server of the environment, app-1. You see its live statistics: processor, memory, disk, network, the containers, and the service of API Maker. Under its services, you can start, stop, or restart each one. Under its files, you can browse, open, edit in a code editor, upload, and download. There is a terminal, in the window. systemd runs the API Maker program, the build for this server, with its appRoot, its env file, and its memory.

You can watch its logs live: API Maker and its service, the reverse proxy, each database, Docker, and the system. And its history shows everything Launchpad did there. Now the data server. Open its terminal. We see orders on PostgreSQL, and the MongoDB and Redis of API Maker, each one healthy. Docker starts them again after a crash, and when the server boots.

Moving with the data

Move, on the page of a server, moves what it runs, with its data, to another server. We move orders to app-1. The review says the data is copied while orders still runs. Then orders stops, the last changes are copied, and it starts on app-1. The old copy stays on data, unless you choose to delete it, and the review gives the command that deletes it. Click Move. It is done.

The data was copied from server to server, and the old copy is kept, with its command. The data goes straight from server to server, with a key made for this copy only. The key only lets rsync write into the data folder, and it is removed right after. The first copy runs while the database serves. The last copy runs once the database is stopped, and compares every file by its content.

So a page rewritten in the same second, or an old copy that the move goes over, cannot leave old data behind. When the servers cannot reach each other, the data goes through this computer.

From your laptop to production

Here is orders, in the architecture. Its panel has Export and Import, with the file of Local mode. It works with the member that takes the writes, over SSH. Click Export. Everything its server holds is written on this computer. Import reads such a file from this computer into it, even the export of a database from Local mode. First you see the plan: what it replaces, what it makes, the accounts, and what stays.

Replacing needs a yes. It is imported, and the replicas of a cluster follow. Nothing stays on the server.

PM2 or systemd

Servers set up before Launchpad often run API Maker with PM2. Then a deployment asks first, server by server. Keep PM2, and PM2 starts API Maker again, with the settings of the environment, and keeps everything else it runs. Or switch to systemd, which is recommended. systemd runs API Maker, and PM2 keeps the rest. When API Maker does not answer, PM2 runs it again, as before.

Uninstall or forget a server

Now a server you no longer need. Open its page, and click Remove what Launchpad installed. Its services and the sandboxes of API Maker go, and their data too if you choose. Docker and every other container stay. app-1 is in the architecture of production. Remove it there and deploy, and its services go. On the Servers page, Forget takes a server off this computer only: its address and its credentials.

app-2 is gone from the list, but the server itself is untouched.

Your settings in one file

In Cloud settings, you can export the projects, the environments, and the servers into one file. It is a backup, or the way to move to another computer. It can hold the passwords, keys, and license keys if you want, sealed by a passphrase. Importing reads such a file. Neither export nor import changes anything on the servers. And a server added again, on another computer, is picked up with what it runs.

Recap

To sum up. Every version change is reviewed before it runs. Health, statistics, files, terminals, and logs are in one window. Moves copy the data while it runs, and check every byte at the end. Data goes from your laptop to production in one file. A server can be removed, or only forgotten. And your Cloud settings are sealed in one file. That is the series on API Maker Launchpad.

API Maker. Build faster. Spend smarter. Deliver better.