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​
curl -L -O https://github.com/utopiops/homebrew-utopiops/releases/download/better-ux/utopiops-linux-0.0.7.tar.gz
tar -xvf utopiops-linux-0.0.7.tar.gz
apt install utopiops_0.7.3_all.deb
windows​
download and run this binary utopiops-windows
check releases for new release​
Getting Started​
- After Installation step run
utopiops
- If you are an utopiops user just press enter
Then you will be asked to enter your username and password which are you utopiops.com credentials
If you enter user/pass correctly cli will be registerd and you are ready to go!
Live log
utopiops log -a [app-name] -e [env-name]
run it to have your application logs live.
-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 containeshealth
won't be printed.
- Forexample if you use
--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 containeshealth
will be printed.
- Forexample if you use
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
- 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
- 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
- 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
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.