diff --git a/docs/.gitbook/assets/aws_ec2_ami.png b/docs/.gitbook/assets/aws_ec2_ami.png new file mode 100644 index 0000000000000..6bc3f2260e805 Binary files /dev/null and b/docs/.gitbook/assets/aws_ec2_ami.png differ diff --git a/docs/.gitbook/assets/aws_ec2_instance_type.png b/docs/.gitbook/assets/aws_ec2_instance_type.png new file mode 100644 index 0000000000000..c719d46722e7f Binary files /dev/null and b/docs/.gitbook/assets/aws_ec2_instance_type.png differ diff --git a/docs/.gitbook/assets/aws_ec2_instance_view.png b/docs/.gitbook/assets/aws_ec2_instance_view.png new file mode 100644 index 0000000000000..371b0ef5a2dec Binary files /dev/null and b/docs/.gitbook/assets/aws_ec2_instance_view.png differ diff --git a/docs/.gitbook/assets/aws_ec2_launch.png b/docs/.gitbook/assets/aws_ec2_launch.png new file mode 100644 index 0000000000000..259366b620241 Binary files /dev/null and b/docs/.gitbook/assets/aws_ec2_launch.png differ diff --git a/docs/.gitbook/assets/aws_ec2_security_group.png b/docs/.gitbook/assets/aws_ec2_security_group.png new file mode 100644 index 0000000000000..f584064dad2ab Binary files /dev/null and b/docs/.gitbook/assets/aws_ec2_security_group.png differ diff --git a/docs/.gitbook/assets/aws_ec2_ssh_key.png b/docs/.gitbook/assets/aws_ec2_ssh_key.png new file mode 100644 index 0000000000000..1776c280db723 Binary files /dev/null and b/docs/.gitbook/assets/aws_ec2_ssh_key.png differ diff --git a/docs/contributing/contributing-to-dataline/developing-locally.md b/docs/contributing/contributing-to-dataline/developing-locally.md index b5f25d46e32b4..8257bcb5c54a4 100644 --- a/docs/contributing/contributing-to-dataline/developing-locally.md +++ b/docs/contributing/contributing-to-dataline/developing-locally.md @@ -6,10 +6,10 @@ git clone git@github.com:datalineio/dataline.git cd dataline docker-compose -f docker-compose.build.yaml build -docker-compose up +VERSION=dev docker-compose up ``` -The build will take a few minutes. Once it completes, Dataline will be running in your environment. +The build will take a few minutes. Once it completes, Dataline compiled at current git revision will be running in your environment. ## Running Acceptance Tests diff --git a/docs/deployment/deploying-dataline/on-aws-ec2.md b/docs/deployment/deploying-dataline/on-aws-ec2.md index d86be0d01eb14..4e2aa4870dd78 100644 --- a/docs/deployment/deploying-dataline/on-aws-ec2.md +++ b/docs/deployment/deploying-dataline/on-aws-ec2.md @@ -4,41 +4,114 @@ The instructions have been tested on `Amazon Linux 2 AMI (HVM)` {% endhint %} -## Pre-requisites +## Create a new instance -* Create a new instance or use an existing instance -* The instance **must** have access to the internet -* The instance **must** have these two ports open \(using security groups\): - * `8000` \(webapp\) - * `8001` \(API\) -* You **must** have an `ssh` access -* You **must** have `docker` installed +* Launch a new instance +![](../../.gitbook/assets/aws_ec2_launch.png) + +* Select instance AMI + +![](../../.gitbook/assets/aws_ec2_ami.png) + +* Select instance type + +![](../../.gitbook/assets/aws_ec2_instance_type.png) + +* `Next: Configure Instance Details` + * You can tune parameters or keep the defaults +* `Next: Add Storage` + * You can tune parameters or keep the defaults +* `Next: Add Tags` + * You can tune parameters or keep the defaults +* `Next: Configure Security Groups` + * We are going to allow network for `ssh` + +![](../../.gitbook/assets/aws_ec2_security_group.png) + +* `Review and Launch` +* `Launch` +* Create a ssh key so you can connect to the instance + * Download the key \(and don't lose it or you wont be able to connect to the instance\) + +![](../../.gitbook/assets/aws_ec2_ssh_key.png) + +* `Launch Instances` + +![](../../.gitbook/assets/aws_ec2_instance_view.png) + +* Wait for the instance to become `Running` + +## Install environment + +{% hint style="info" %} +This part assumes that you have access to a terminal on your workstation +{% endhint %} + +* Connect to your instance + +```bash +w$ SSH_KEY=~/Downloads/dataline-key.pem # or wherever you've downloaded the key +w$ INSTANCE_IP=REPLACE_WITH_YOUR_INSTANCE_IP +w$ chmod 400 $SSH_KEY # or ssh will complain that the key has the wrong permissions +w$ ssh -i $SSH_KEY ec2-user@$INSTANCE_IP +``` + +* Install `docker` + +``` +~]$ sudo yum update -y +~]$ sudo yum install -y docker +~]$ sudo service docker start +~]$ sudo usermod -a -G docker $USER ``` -$ sudo yum update -y -$ sudo yum install docker -$ sudo service docker start -$ sudo usermod -a -G docker $USER -$ logout # necessary for the group change to take effect + +* Install `docker-compose` + +```bash +~]$ sudo wget https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m) -O /usr/local/bin/docker-compose +~]$ sudo chmod +x /usr/local/bin/docker-compose +~]$ docker-compose --version ``` -* You **must** have `docker-compose` installed +* Close the ssh connection to ensure the group modification is taken into account ```bash -$ sudo wget https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m) -O /usr/local/bin/docker-compose -$ sudo chmod +x /usr/local/bin/docker-compose -$ docker-compose --version +~]$ logout ``` -## Start Dataline +## Install & Start Dataline + +* Connect to your instance + +```bash +w$ ssh -i $SSH_KEY ec2-user@$INSTANCE_IP +``` + +* Install Dataline + +```bash +~]$ mkdir dataline && cd dataline +~]$ wget https://raw.githubusercontent.com/datalineio/dataline/master/{.env,docker-compose.yaml} +~]$ docker-compose up -d +``` + +## Connect to Dataline + +{% hint style="danger" %} +For security reason we strongly recommend to not expose Dataline on Internet available ports. + +In the future versions we will add support for SSL & Authentication +{% endhint %} + +* Create ssh tunnel ```bash -$ mkdir dataline && cd dataline -$ wget https://raw.githubusercontent.com/datalineio/dataline/master/{.env,docker-compose.yaml} -$ docker-compose up +w$ ssh -i $SSH_KEY -L 8000:localhost:8000 -L 8001:localhost:8001 -N -f ec2-user@$INSTANCE_IP ``` -You can now connect to your instance public IP on port `8000` +* In your browser, just visit [http://localhost:8000](http://localhost:8000) +* Start moving some data! ## Troubleshooting