Installing and Setting Up Transmission
Prerequisites (OSX + Linux)
For Transmission to work correctly, it is necessary to download and set up docker.
Once Docker is installed, you will need a Docker "network" named portal:
docker network create portal
Create the directory tree to persist to your local database:
mkdir -P ~/data/shipchain/transmission/postgresql
NOTE: Depending on OS settings, some users may encounter permission errors when running Transmission. This is commonly due to missing Shared Drives on Windows or File Sharing on Mac. Be sure these are setup to allow access to the /data directory you created.
It is strongly encouraged that you utilize Windows Subsystem for Linux (WSL) when using Docker for Windows. Without this you are very likely to encounter issues with volume mapping permissions in later steps.
Configure WSL with Docker for Windows
Nick Janetakis has a fantastic article on the steps required to get Docker for Windows and WSL working flawlessly. Pay special attention to the Ensure Volume Mounts Work step. Without that your images will not properly build.
Appropriate Directories After following the steps above, in the Ubuntu Bash prompt you should be able to see the your Windows drives mounted at the root level.
/c /c/Users /d
Clone the repository:
git clone https://github.com/ShipChain/transmission.git shipchain-transmission # If multi-factor authentication is set up on github run this instead git clone firstname.lastname@example.org:ShipChain/transmission.git shipchain-transmission
Navigate to the
shipchain-transmission folder and install the packages:
Transmission uses Poetry for dependency management. Hard dependencies are specified in the pyproject.toml and then resolved into poetry.lock by manually calling
bin/ddo poetry lock. The poetry.lock file enumerates every version of every dependency used in a build; this file is checked-in and versioned.
After using the
bin/dc build command to build your local environment,
bin/ddo poetry install needs to be run in order to install the dependencies inside the virtualenv of the docker container. This virtualenv is cached locally in the .virtualenv folder.
After making a change to pyproject.toml, you will need to run
bin/ddo poetry lock to update the poetry.lock file.
Transmission is designed to work on top of Engine, you must have Engine installed and configured to use Transmission. Here is a guide on installing Engine and getting it running.
Inside the same
shipchain-transmission folder, run this command to start transmission:
When this note comes up then Transmission will be available for use via
Starting ASGI/Channels version 2.1.7 development server at http://0.0.0.0:8000/
In addition, you are able to see the current Celery tasks when running locally through Flower, which is mapped to the host port 8888.
When testing with transmission, a very useful tool is postman.
This program allows for direct calls to transmission for testing or other usage.
You can import a list of commands to postman from this file:
There are several scripts in the
bin/ folder dedicated to making life simple:
bin/check_style will run the prospector lint tool against the repo, flagging any violations of common Python style guides (such as PEP-8).
bin/docker_tests will run the full suite of lint checks and unit tests, as they are run during a CircleCi build. This is useful to ensure a build is valid before pushing code.
bin/dc is an alias for
docker-compose -f compose/dev.yml(you could use e.g
compose/my_settings.ymlby setting environment variable
bin/dcleanup is quick way to "kill, remove, restart, tail logs", so if you need to restart the
runserverservice and follow the logs you can
bin/ddo is an alias for
bin/dc run django $*, so
ddo bashwill get you a shell inside a django container.
bin/dmg is an alias for
bin/ddo manage.py $*, so you can quickly run management commands like
If you plan on doing a lot of development work, you might consider adding
.bashrc file so you can skip typing
bin/. Ensure you first understand the security
risks of doing so.
The scripts provided in the bin directory allow for easier interaction with the Docker compose services and containers.
By default, these scripts use the dev.yml compose file. This can be changed to any configuration file by setting
ROLE environment variable. For example if you want to use
my_settings.yml with the scripts provided,
you would only need to set
ROLE=my_settings in your environment.
See the public OpenAPI 3.0 documentation at transmission.shipchain.io for a full enumeration of API endpoints with example requests/responses.