One of the most important features of Hakiri Toolbelt is version syncing with the cloud. Why sync with the cloud? This is the only way to keep your server stacks up to date and receive vulnerabilities notifications the same day they become published in the CVE database.

To sync your local stack with the cloud you’ll first have to setup an authentication token in your system. After that’s done, go to your existing project. You’ll see a list of stacks that you created by following branches on GitHub. Look for the stack ID next to the desired branch name.

Syncing Stacks

After you setup the authentication token and figured out which stack you want to update, run the following command:

hakiri system:sync -m manifest.json -s stack_id

This will scrape versions of your system software that are specified in the manifest file, compare them to versions in the cloud and then ask you if you want to update versions in the cloud with your system versions.

If you want this command to update cloud versions without any questions add the --force argument:

hakiri system:sync -m manifest.json -s stack_id --force

This way you can sync versions automatically, which could be useful during continuous integration and updates.

Syncing Gemfile.lock

You can also sync your Gemfile.lock file separately from automatic GitHub syncing:

hakiri gemfile:sync -g Gemfile.lock -s stack_id

This will grab your local Gemfile.lock, compare gems in it to versions in the cloud and then ask if you want to update versions in the cloud with your system versions.

If you want the command to update cloud versions without any questions add the --force argument:

hakiri gemfile:sync -g Gemfile.lock -s stack_id --force