armory-cli

command module
v0.4.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

armory-cli

Go Report Card License

The CLI for Armory Cloud.

Working Locally With a Mock HTTP Server

Features may not always be developed in the Deploy Engine API or we may want to test a particular response. This may not be easily achieved with unit tests or we may have a need to simulate a state of a deployment during runtime.

You may run any webserver you like locally which can return a JSON response, but spring-potato is a fine option. You can start it with a bootRun. The connection to deploy engine requires HTTPS, which means your localhost has to have a valid trusted SSL Cert. The easiest way to do this is the following:

brew install caddy
brew install mkcert
mkcert -install #this makes a trust store on your machine
mkdir ./certs && cd ./certs
mkcert "*.WHATEVER.anythingYouWant" #this is just the CNAME entry you want to use locally

Next edit your /etc/hosts and add the following:

127.0.0.1	specificSubdomain.WHATEVER.anythingYouWant

Make a file named: Caddyfile in a dir of your choice

specificSubdomain.WHATEVER.anythingYouWant {
  tls ./_wildcard.WHATEVER.anythingYouWant.pem ./_wildcard.WHATEVER.anythingYouWant-key.pem
  reverse_proxy localhost:8080 {
  header_up Host                {host}
      header_up Origin              {host}
      header_up X-Real-IP           {remote}
      header_up X-Forwarded-Host    {host}
      header_up X-Forwarded-Server  {host}
      header_up X-Forwarded-Port    {port}
      header_up X-Forwarded-For     {remote}
      header_up X-Forwarded-Proto   {scheme}
  }
}

While in that directory, execute caddy run and it will automatically pick up your config, otherwise if you're not in the directory use the --config <locationOfYourConfig>. You should not see any errors. Make sure your spring potato app is running at localhost:8080

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL