npm install -g @architect-io/cli
Note: the CLI uses the keytar library to store
your Architect Cloud credentials securely on your machine. If your OS doesn't support
keytar (like many linux systems) you will see an install error in the logs during NPM
install. Keytar is an optional dependency and the install will complete successfully
despite this error, but you may hide it
by running npm install with the
git clone https://github.com/architect-team/microservices-demo.git
The sample used in this guide is courtesy of the GCP team and includes 10 distinct, but related microservices that serve a frontend e-commerce web app. The stack includes services written in 5 distinct languages, and the Architect team has simply written service config files for each process and published them to our registry.
The CLI includes all the tools necessary to spin up entire application stacks on a local machine. Local deploys will pull down artifacts from Architect's registry as needed, but services can also be cited by file path via an environment configuration file to allow for local debugging. The command below locates each service by file path and builds each from the local source code:
cd microservices-demo architect deploy --local arc.env.json
After you're comfortable with the stack running locally, you might want to test out a production-grade environment and cloud platform. Architect allows applications to be easily deployed to remote environments on a variety of different platforms without any code changes required. Any services published to our registry can be deployed to your preferred cloud with your own choices for tools and settings:
# Deploying remotely requires that you login to Architect architect login # Create your first environment architect env:create "my-env-name" --account "my-org" # Deploy the hipster-shop stack # This will prepare a diff for you to review before resources are provisioned architect deploy arc.env.json -a "my-org" -e "my-env-name"