NeetoDeploy CLI

NeetoDeploy CLI is a tool that allows the admin to interact with the deployments easily from a terminal instead of using the web interface. CLI allows the admin to modify environment variables, view live logs, and connect to the console of applications deployed in the NeetoDeploy.

Install

gem install neetodeploy

Verify if the CLI has been installed correctly by running the following command:

neetodeploy

It should show the following output:

image

If you have any trouble installing the gem, please try running

rbenv rehash

after which you can install the gem by running:

gem install neetodeploy

Authenticate

neetodeploy login

You will be asked for your organization subdomain. After the subdomain is given, login page will be opened in the browser.

Upon successful login, you should see the following message in your terminal:

image

Note that you can access/modify any app that you have access to (based on your account email) in any organization with the same login. Even though CLI asks for an organization before login, CLI is not organization dependent.

View Environment variables.

neetodeploy config list -a app_name

The -a option will take in the name of the application you are interested in viewing the environment variables. If you're unsure, what is the exact name of the application, you can find out by visiting the project at https://neeto-engineering.neetodeploy.net/.

Set environment variables

neetodeploy config set RAILS_ENV=staging -a neeto-form-web-staging

Delete environment variables

neetodpeloy config unset RAILS_ENV -a neeto-form-web-staging

View live logs

neetodeploy logs -a neeto-form-web-staging

The above command tails the logs for all dynos/processes. If you were interested in viewing the logs of the web dyno alone, you could specify that using the -p flag.

neetodeploy logs -a neeto-form-web-staging -p web

Connect to the console

neetodeploy exec -a neeto-form-web-staging

Since the above command will spin up a new dyno, it may take about a minute to start. After the console session is up, you can run commands like rails c to open the rails console or other commands based on your need.

To exit the console, press Ctrl+C or run exit.

Update Redis eviction policy

For updating the Redis eviction policy, you can use the below command.

neetodeploy redis set -k maxmemory-policy -v allkeys-lfu -n neetodeploy-redis-neeto-wireframe-web-production-buggy

#For confirming the value you can use the get command

neetodeploy redis get -k maxmemory-policy -n neetodeploy-redis-neeto-wireframe-web-production-buggy

neetodeploy-redis-neeto-wireframe-web-production-buggy is the addon name.

Can't find what you're looking for?