This guide will help you to setup an Edge Server on you host computer. You can use the same information to host the edge server locally in your private network, On-premises, or in your cloud provider.
Datafi self hosted Edge Servers are containerized, they can be run anywhere a Docker container can run. If you don't have a Docker environment, you can start by installing Docker on your host computer.
Complete the following steps to setup a local Edge Server.
These step-by-step instructions will show you how to setup an Edge Server on your host computer and connect a MySQL database. You can use the same steps to connect other supported data sources by using the specific Datafi CLI
Install Docker Desktop and complete the setup steps (ref: https://www.docker.com/products/docker-desktop )
Verify Docker has been installed by running the following command and confirm the Hello from Docker! reply:
docker run hello-world
Open the Terminal and run the following commands to pull and then run the latest
docker pull datafi/cli:latest
docker run --rm -ti -v ~/temp:/es/out datafi/cli:latest
The CLI container will export to the /es/out folder and connects a local directory (
~/temp). Instead of
~/tempyou can use any local directory.
The previous step runs the CLI container and installs
dfclito generate the environment variable used while running the Edge Server. Run the following command in the bash shell from the previous step.
dfcli dataset --endpoint <IP address or host name where the Edge Server will run> --type mysql --name <name of your dataset> --pointOfContact <your email address> --address <IPP address of host name of your mysql server> --dbname <database name> --username <database user> --password <user password> add
The above command adds a MySQL database. The parameters will be different for each data source. Run
dfcli datasetto see the parameters for the available data sources.
This step will connect to the data source with the provided credentials. It will generate a
key.txtfile in the
key.txtfile will be used in Setp 5 when running the container. Before continuing, copy the unique URL for the dataset which will be used in setp 6.
exitto quite the CLI.
Run the Edge Server container with the
key.txtfile as an environment variable.
docker pull datafi/es:latest
docker run --rm -p 443:443 -e KEY=$(cat ~/temp/key.txt) datafi/es:latest
Once started, you should see
Edge Server startedin the logs
Use the URL copied from step 4 to connect the Edge Server and add the dataset to your Datafi workspace. Note: Log into your workspace before opening the link from your browser. Signed up for a free Datafi account here.
After completing Step 1, you should see the Edit Dataset dialog which will allow you to configure and edit the details for the dataset. Once this is saved, you will be redirected to the Catalog
(The dialog can be accessed again any time by clicking the Edit icon of the dataset you are currently active on, in case you close it before you are finished or want to make a change.)
In the dataset Overview you can update the name, description, and tags for your dataset. This information is used to help other users find this dataset and it’s contents.
The rules sections allows you to create security access and data privacy rules that can mask specific fields in your dataset's tables. Rules control how data is seen by users.
Data can be viewed in your workspace and shared with other users.