Installing Tokaido
Linux
The Tokaido CLI has been tested on Linux distributions Ubuntu and Mint, other distributions should also be compatible. It is ready to support the most common Drupal configurations. Before using Tokaido for your project, it's a good idea to make sure it's compatible.
Tokaido works with Drupal projects running:
- Drupal 7 or Drupal 8
- PHP 7.1, 7.2 or 7.3
- Your Drupal site must be in a Git repository
It is highly recommended that your project also includes the following best practices:
- You should use PHP Composer to install and manage your Drupal site and modules
- Your Drupal site should be located in a sub-directory off your Git root, such as
/web
or/docroot
Info
While these last two requirements aren't essential, we are unable to provide any support if you don't use Composer or if you place your Drupal site (ie: DRUPAL_ROOT in the same folder as your .git folder)",Once you're comfortable with the requirements above, you're ready to install Tokaido.
While building Tokaido, we made some assumptions about how most people develop their Drupal sites. If you can't satisfy these requirements, but would still like to use Tokaido, please get in touch. We want to hear from you so that we know that there is demand for other use cases, and we hope we can ask you to help us test support for these new configurations.
Linux System requirements
On Linux, Tokaido must use the 'Unison' sync service. This uses a network connection to perform bi-directional sync between the Tokaido environment and your local host.
To use Tokaido, you need to install Unison and a filesystem monitor program. Here's an example of how to do this on Debian/Ubuntu systems:
UNISON_VERSION=2.48.4
sudo apt-get -y install inotify-tools ocaml-nox build-essential
curl -L https://github.com/bcpierce00/unison/archive/${UNISON_VERSION}.tar.gz | tar zxv -C /tmp
cd /tmp/unison-${UNISON_VERSION}
sed -i -e 's/GLIBC_SUPPORT_INOTIFY 0/GLIBC_SUPPORT_INOTIFY 1/' src/fsmonitor/linux/inotify_stubs.c
make UISTYLE=text NATIVE=true STATIC=true
sudo cp src/unison src/unison-fsmonitor /usr/local/bin
Installing Tokaido
Once you have Unison and unison-fsmonitor installed, you can get the latest Tokaido release as a binary from our Github release page
First up, download the binary to your system and make it executable:
curl -L https://github.com/ironstar-io/tokaido/releases/latest/download/tok-linux-amd64 -O && chmod +x tok-linux-amd64
The Tokaido CLI has a built-in self-installer, so you now run...
./tok-linux-amd64 install
This will install Tokaido to ~/.tok/bin/{version}/tok and create a symlink to this location from /usr/local/bin/tok
You don't have to do this. If you'd like to install Tokaido somewhere else and use it directly, just copy the binary you downloaded, for example:
cp tok-linux-amd64 ~/local/bin/tok
Upgrading Tokaido
You can easily upgrade Tokaido at any time by running:
tok upgrade
This command will check for a new version of Tokaido and if available, offer to download it to ~/.tok/bin/{version}/tok
and link to it from /usr/local/bin/tok
If you prefer not to use this method, you can always get the latest Tokaido version from our Github release page
Installing the Tokaido Certificate Authority in Linux
Tokaido offers an easy-to-use proxy service on the https://*.local.tokaido.io:5154 address. This makes it offers a way to easily find your projects locally without having to worry about fixing port numbers.
This service is provisioned using a trusted SSL Certificate Authority which you can install in your browser to avoid annoying SSL security warnings.
The exact process to install this certificate will vary based on your browser. Below, we've included instructions for Firefox and Chrome/Chromium on Linux:
Install Tokaido's Certificate Authority on Chrome and Chromium
Go to Settings > Advanced
Under "Privacy and Security" select "Manage Certificates"
Select Authorities > Import
Navigate to /home/{Your Username}/.tok/tls/ca/ca.crt
Select "Trust this certificate for identifying websites" and click OK
Install Tokaido's Certificate Authority on Firefox
Go to Settings > Privacy and Security
Scroll down to Security > Certificates and select View Certificates
Under Authorities select Import and select the file in /Users/{Your Username}/.tok/tls/ca/ca.crt
Select Trust this CA to identify websites and then select OK
Select OK once more
Stay up to date!
We release a new version of Tokaido pretty regularly, so be sure to periodically check the latest releases on Linux.