89 lines
4.0 KiB
Markdown
89 lines
4.0 KiB
Markdown
+++
|
|
title = "Download SDK"
|
|
weight = 2
|
|
+++
|
|
|
|
## Request Access 🔑
|
|
|
|
To start using the Server SDK you will need to request access though our sales department. Please email <a href="mailto:api@bluetradesys.com">api@bluetradesys.com</a> or call <a href="tel:919-913-0850">(919) 913-0850</a> and we will provide download credentials.
|
|
|
|
## Download
|
|
|
|
Download the latest SDK image here: [spark_sdk.zip](https://api.bluetradesys.com/download/spark_sdk.zip)
|
|
|
|
Unzip that folder into a working directory. Inside you should see something like this:
|
|
|
|
```
|
|
spark_sdk.img
|
|
client/
|
|
spark_client.cmd
|
|
examples/
|
|
```
|
|
|
|
## Import
|
|
|
|
Import the spark_sdk image into docker using the `docker load` command.
|
|
{% clipable() %}
|
|
docker load < spark_sdk.img
|
|
{% end %}
|
|
|
|
<div class="info">
|
|
<i class="fa fa-lightbulb-o fa-fw" aria-hidden="true"></i>
|
|
<strong>If you see this error it means Docker Desktop is not running:</strong>
|
|
|
|
|
|
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/images/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
|
|
</div>
|
|
|
|
Confirm that the import worked by running `docker images` which should list the new image.
|
|
```
|
|
c:\bts> docker images
|
|
REPOSITORY TAG IMAGE ID CREATED SIZE
|
|
bluetradingsystems/spark_sdk latest e2be89436e73 4 hours ago 3.89GB
|
|
```
|
|
|
|
<!--
|
|
## Run
|
|
|
|
Start the docker container by running
|
|
```
|
|
docker run -d -v %CD%:/work --name spark_sdk --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 8000:8000 -p 8001:8001 -p 8008:8008 bluetradingsytems/spark_sdk
|
|
```
|
|
<div class="linux">
|
|
<i class="fa fa-linux fa-fw" aria-hidden="true"></i>
|
|
If you are using Linux or Mac replace <strong>%CD%</strong> with <strong>$PWD</strong>.
|
|
</div>
|
|
|
|
The first time you invoke `docker run` you may be prompted to "share" your filesystem with Docker. This usually works fine but if you run into trouble, see <a href="">Docker Desktop for Windows tips</a> on avoiding common problems.
|
|
|
|
## Success 🎉
|
|
Docker is now running the spark SDK image. If you are on Windows or Mac it is running inside a virtual Linux machine. You can see that is is running by typing `docker ps` to list running docker containers. If you restart the Docker Desktop application you will need to start the spark_sdk image again using `docker start spark_sdk`.
|
|
|
|
You should now be able to access an admin interface at http://localhost:8008/ which will let you stop and start the spark server process.
|
|
-->
|
|
|
|
## Update
|
|
|
|
To update your Spark SDK simply download an unzip a new [spark_sdk.zip](https://api.bluetradesys.com/download/spark_sdk.zip) and use `docker load < spark_sdk.img` to overwrite the old image with the new one.
|
|
|
|
To preserve the old image so you can go back to it later run `docker tag spark_sdk spark_sdk:your_custom_tag` before loading the new SDK image.
|
|
|
|
### Re-build the Dev Container
|
|
|
|
If you are using Visual Studio Code you also need to rebuild the dev-container so it picks up the new image.
|
|
|
|
#### Inside VSCode
|
|
To re-build from inside Visual Studio Code. Click the 'Remote Explorer' icon on the left hand side.
|
|
You should see your spark_sdk project listed under the Containers section. Right click on it and select **rebuild-container**.
|
|
|
|
#### Command Line
|
|
To re-build from the command line run `docker ps -a` and find the row with the spark_sdk image.
|
|
```
|
|
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
|
54d96cfa3888 spark_sdk "/bin/sh -c 'echo Co…" About a minute ago Up About a minute 127.0.0.1:9000-9001->9000-9001/tcp quizzical_lichterman
|
|
```
|
|
Then run `docker rm 54d96cfa3888` (use your container id instead of 54d96cfa3888) or `docker rm quizzical_lichterman` (use your container name).
|
|
|
|
|
|
|