golem
v0.1.7
Published
automatically provisioned virtual machines for docker and headless automation
Downloads
22
Maintainers
Readme
Golem
Run apps in automatically provisioned virtual machines or docker containers.
- includes docker (inside an Ubuntu VM)
- powered by Vagrant, VirtualBox and Ubuntu 14.04 LTS
- takes care of folder sync and port forwarding
Requirements
- Windows, Mac OS X, Linux, or Solaris
- vagrant
- virtualbox
Note: golem init
will check these requirements for you (and on OSX it will try to install them using brew
and brew cask
).
Install
npm i -g golem
now you can create a global golem for your user:
golem init --global
or create one for the current folder (./.golem
):
golem init
Updates
You can keep golem up-to-date by running:
# download updates, reload and re-provision will happen if necessary
golem update
Usage
Once a golem is ready, you can start running commands on the golem virtual machine
# Summon your Golem! (spin up the vm)
golem summon
golem do pwd
# prints the synced guest folder (created on the VM)
# golem will run the command (after "do" word) in the vm
# first time you run "golem do" on a directory, a synced folder is created to
# mirror cwd on guest vm, then commands are executed in that guest folder
golem do ls
# will list the files in current host folder, shared into the VM
or you can just open an ssh session starting a the synced folder with:
golem do
To recreate your golem from scratch, you can always:
# remove the VM
golem destroy
# re-create (and re-provision)
golem summon
Docker
you can run docker commands with:
golem docker run ubuntu echo "hi, from docker"
# note: "golem docker" is just a shortcut to "golem do sudo docker"
if you like docker-compose a shortcut is provided to:
golem docker-compose
Port Forwarding
In some cases you want to forward ports in the VM to your host machine (eg. from you docker containers)
# expose port 80 in the VM as 8080 in your host machine, 443 as 8443
golem expose 80:8080,443:8443
# list exposed ports
golem expose list
# remove all exposed ports
golem expose clear