Skip to main content

Cli

Utopiops cli is a command line interface which helps you to create and deploy applications locally. Cli also gives you the ability to have live logs for each ecs application you have.

Installation

npm

npm i utopiops

  • If your device is a m1 mac you need to use brew

mac

brew tap utopiops/utopiops && brew install utopiops

linux

  1. curl -L -O https://github.com/utopiops/homebrew-utopiops/releases/download/better-ux/utopiops-linux-0.0.7.tar.gz

  2. tar -xvf utopiops-linux-0.0.7.tar.gz

  3. apt install utopiops_0.7.3_all.deb

windows

download and run this binary utopiops-windows

check releases for new release

Getting Started

  1. After Installation step run utopiopsshow start
  • If you are an utopiops user just press enter
  1. Then you will be asked to enter your username and password which are you utopiops.com credentials show pass

  2. If you enter user/pass correctly cli will be registerd and you are ready to go! show pass

Live log

utopiops log -a [app-name] -e [env-name] run it to have your application logs live.

show logs

  • -a, --application is name of application you want to have it's logs.

  • -e, --environment is name of environment which your apps has been deployed on it.

  • --exept use this flag if you dont want to see your logs which containes certain word.

    • Forexample if you use --exept health logs which containes health won't be printed.
  • --find use this flag if you only want to see your logs which containes certain word.

    • Forexample if you use --find health only logs which containes health will be printed.

create

utopiops create -t [app-type] run it and enter requested properties to create and deploy your application!

  • -t, --type is type of application you want(default value is static-website). currently we support 3 types
  • ecsapp
  • s3-website
  • static-website
  • --is-custom-domain is domain for static website is custom(only used for type static-website)

create ecs application

utopiops create -t ecsapp

create ecs

  • name of application will be the name of your application.
  • Description will be shown in portal.
  • port, this port of your app will be exposed.
  • protocol, currently we support https and grpc.
  • environment, is name of environment which your app will be deploy on it(there must be an environment with this name on utopiops).
  • Other fields which you need to set when you use portal will be set as default.

create s3 website

utopiops create -t s3-website

create ecs

  • name of application will be the name of your application.
  • Description will be shown in portal.
  • repository url is your git repository.
  • environment, is name of environment which your app will be deploy on it(there must be an environment with this name on utopiops).
  • Other fields which you need to set when you use portal will be set as default.

create static website(fully managed)

utopiops create -t static-website

create ecs

  • name of application will be the name of your application.
  • Description will be shown in portal.
  • repository url is your git repository.
  • build command is the command which build your app.
  • output path for build command.
  • index document in the content of the S3 Static Website is selected as the entry of the website.
  • error document is considered as the file to be served as the error page.
  • branch is for your git repository.
  • Other fields which you need to set when you use portal will be set as default.

static website with custom domain

utopiops create -t static-website --is-custom-domain true

create ecs

It is exactly like static-website but you need to enter one more thing and that is domain which must be a valid domain that have been added.

deploy

deploy ecs application

utopiops deploy -a [app-name] -e [env-name] --image-tag [tag-id] --repo [repo-name] run it to push your created image with specefied tag-id to given ecr repository and then deploy your application to given environment in utopiops.

  • -a, --application is name of application you want to deploy it(there must be an application with this name on utopiops).

  • -e, --environment is name of environment which your app will be deploy on it(there must be an environment with this name on utopiops).

  • --image-tag is the tag-id for your build application.

  • --repo is the ecr repository which your created image will be pushed to it.