Introduction
Architect centers around the needs of developers, enabling them to create deployment pipelines without needing to know about the operational details of building and maintaining modern DevOps infrastructure.
Developers love Architect because it emulates tools they use and love already, like NPM, to describe their application architecture and declare its dependencies. DevOps engineers love Architect because our automation makes deployments flexible, dynamic, and secure so that DevOps can focus on other, value-generating initiatives to support developers rather than constraining them unnecessarily.
How do we do this?
- We use Docker to make deployments portable
- We use a config file (
architect.yml
) to describe your app’s structure and dependencies - We provide a single command to deploy locally, to deploy to a preview environment, or to deploy to production
First steps
Install the CLI
We built Architect for developers, and our feature-rich CLI provides the best developer experience. Before you do anything else, install Docker and NPM if you haven’t already, and make sure Docker is running.
Then install the CLI via NPM:
Alternatively, you can download the binary for your system architecture from
Github.
Just download the appropriate bundle, extract it, and link the included bin
folder to your user home directory.
Try a Starter Project
To help you get started using Architect, we’ve provided several
starter projects that use different languages and
frameworks. While Architect is
language-agnostic, we know developers have preferences, and we aim to give each developer a learning context they are
comfortable with. Each starter project implements a simple application and defines it as an Architect Component using the
architect.yml
config file. You can clone the starter project repository to your local machine or use the architect init
command.
Run architect init
The architect init
presents you with all the starter projects available and clones the one you select to your local machine.
The repo for the selected starter project should now reside where you ran the architect init
command.
Run locally
One of the key benefits of using Architect is the ability to run your application on your local machine seamlessly.
To run the starter project you just cloned, copy the architect dev
command displayed when the architect init
command
completes, and run it from the same location where you ran the architect init
command. The architect dev
command runs your
application and all its dependencies in your local Docker environment. You will see output similar to the following:
You’ll notice in the output above that one or more URLs are provided, depending on your starter project.
For example, starter projects with a frontend will be accessible at https://app.localhost.architect.sh:443/
as
soon as the startup completes.
When you run the command above, Architect reads the architect.yml
file in the repo and transforms it into
a fully enriched docker-compose.yml
file. The application described in this file is run automatically in your local
Docker environment. As shown in the example above, the output from this command provides the URLs where
the services that comprise this component can be accessed. Depending on which starter project you use, your output
may differ slightly. If your starter project contains a frontend service, it will automatically launch in a web browser
once the application is started.
Check out the architect.yml file
The architect.yml
file describes the different services that comprise your application. This is where you’ll define
the interfaces and ingress rules that allow access to your application as well as secrets and dependencies.
This is the architect.yml
file for the react
starter project. Yours will vary slightly depending on the project you
are working with.
For users of Visual Studio Code, check out the Architect extension!
Make your own changes
As you may have noticed, there is a debug
block in the architect.yml
file
that enables hot-reloading for each service within the component. That means you can make changes to
the source code, which will automatically apply to the environment. This allows you to quickly
iterate and see your changes without restarting the application stack.
Create a free Architect account
Now that you’ve successfully run and edited a component locally, it’s time to learn how to register the component and deploy it to a cloud environment. Before you can do that, however, you need to sign up for Architect and create a free account that will house your components and environments.
Login to Architect
After you’ve signed up, you need to login via the CLI to allow access to your account:
Register a component
Before deploying to a cloud environment, you must register and tag your
component with Architect’s component registry. You can register
the component with a single command, substituting your Architect account name for the <account-name>
placeholder.
Run this command from the top-level directory of your project:
The register
command builds the services defined in your architect.yml
file and pushes the artifacts to Architect’s
registry. Once complete, you’ll see output similar to the following.
Create an environment
An environment is an isolated namespace that exists on a Kubernetes cluster where you can deploy your applications. Architect provides a community cloud cluster where you can create a preview environment and deploy your applications for free. To create a new environment on Architect’s free cloud, run the following command:
This command presents you with a list of Kubernetes clusters. Since you haven’t added external clusters to your
account, you should only see architect
. Hit enter to create your environment on the Architect cloud.
When the command completes, you should see output similar to the following:
Deploy to the cloud
Finally, you’re ready to deploy! Run the following command to deploy your application to the environment you just created on the Architect cloud:
Nice work! Now that you’ve gotten the hang of the deploy flow, you can try it out with your own application. Head over to the
configuration section to learn more about the
architect.yml
file and how to write one of your own!