Annotate the AWS_KEY and AWS_SECRET
$ sudo pip install awscli
If you get an error run this instead:
$ sudo pip install awscli --ignore-installed six
If you need to upgrade awscli with pip use:
$ sudo pip install --upgrade awscli
Test awscli by typing:
$ aws help
Configure awscli by running:
$ aws configure --profile ellipsis_dev
And follow the instructions. For more info go to: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-quick-configuration
You can now running the aws cli using the --profile option. For example:
$ aws s3 ls --profile ellipsis_dev
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew update
$ brew update
$ brew cask install java
Check java is working:
$ java -version
FYI On the Mac jdk is installed in:
$ ls -lFa /Library/Java/JavaVirtualMachines
Download link is https://www.lightbend.com/activator/download add the Activator bin folder to your path https://downloads.typesafe.com/typesafe-activator/1.3.10/typesafe-activator-1.3.10.zip
(With Node 7+ you may see errors trying to build.)
$ brew install node@6
Download link is https://ngrok.com/download Suggested installation location: /usr/local/bin Run ngrok using:
$ ngrok http 9000
If you use the free version of Ngrok everytime you restart it Ngrok will assign to you a new subdomain and you will have to update the Playapp configuration. If you upgrade your Ngrok plan you can choose and keep a subdomain. You can then use the Ngrock config. file:
Create a file at ~/.ngrok2/ngrok.yml. It should look like this
authtoken: <AUTH TOKEN>
tunnels:
dev:
proto: http
addr: 9000
hostname: <CHOOSEN SUBDOMAIN>.ngrok.io
Then from the command line you can simply run:
$ ngrok start dev
- Go to https://api.slack.com/apps
- Create a new API Application
- Copy the Client ID, Client Secret and the Verification Token somewhere. You will use them to set some environment variables.
- OAuth & Permission: Add the Ngrok url to the Redirect URL(s)
- Bot Users:
- Click on "Add a Bot User"
- Turn on "Always Show My Bot as Online".
- Event subscriptions:
- Add the Request URL: /slack/event
- Subscribe to these Bot Events:
message.channels
,message.groups
,message.im
,message.mpim
$ git clone git@github.com:ellipsis-ai/ellipsis.git
$ cd ./ellipsis
$ npm install
$ cp ./actw.template ./actw
Now edit ./actw and fill in the env. variables values When you are done make run_app executable with:
$ chmod 755 ./actw
https://docs.docker.com/engine/installation/mac/
In this step you will start a Docker container running Postgres on port 5432. Before you do that you want to make sure you do not have any Postgres instance running on the same port. Just do:
$ ps aux | grep postgres
Stop the Postgres instance if running.
Now you can run Docker Compose:
$ cd ./ellipsis
$ docker-compose up
You should now have a postgres instance running on port 5432. You can verify that by running:
$ PGPASSWORD=ellipsis psql -h 127.0.0.1 -p 5432 ellipsis ellipsis
You also have Elasticsearch on port 9200, Kibana on port 5601, Elasticsearch-head on 9100 and Memcached on 11211.
http://localhost:9200 http://localhost:9100 http://localhost:5601
The app is run using Activator the actw
script is just a wrapper that invokes
Activator with the necessary environment variables.
$ cp actw.template actw
Now edit actw
and fill in all the value for the environment variables
$ vim actw
Finally you can run the app
$ ./actw help
$ ./actw run
$ ./actw
$ ./actw -jvm-debug 9999 run
You can now use any Java debugger to attach to 9999.
$ docker exec -it ellipsis_postgres_1 bash bash
Now that you have a shell in the container, become the postgres user and use the dropdb command to drop the db
$ su postgres
$ dropdb ellipsis-test
In Ellipsis payments are handles by Chargebee. If you do not touch any of the payments code there is nothing to do. The billing pages will simply not be visible in your development server.
If you need to touch the payments code you need to:
- Create a new free Chargebee account
- Get the test site URL and generate a new API key. Complete the setup by clicking on the link in the email Chargebee sent you
- Add 2 env. variables to your IntellJ run configuration: CHARGEBEE_SITE and CHARGEBEE_API_KEY. Note that the CHARGEBEE_SITE is not the full URL but just the subdomain.
- Configure the Chargebee webhooks: go to Settings › API & Webhooks › Webhook Settings, in Webhook URL put: https://<your-dev-server-url/webhooks/chargebee/events, for instance https://ellipsis-matteo.ngrok.io/webhooks/chargebee/events. More info.
- Enable metered billing: go to Settings > SITE SETTINGS > Site Info & Billing Rules, enable Notify and wait to close Invoices and to save the changes made click Update Site Info & Billing Rules. More info
- Create the following cutom fields: On Plan, a field of type checkbox, named "metered" On Customer, two single line fields, organization_id and organization_name On Subscription, two single line fields, organization_id and organization_name
- Plans and Addons are automatically created by the Playapp at start up.