- install go version 1.5.1 or later
- install glide
- type the following:
go get github.com/fabric8io/kansible
cd $GOPATH/src/github.com/fabric8io/kansible
make bootstrap
-
then to build the binary
make build
-
you can then run it via
./bin/kansible
You can run kansible rc ...
easily on a local build when working on the code. However to try out changes to the pod for kansible pod ...
you can run that locally outside of docker with a small trick.
You must set the HOSTNAME
environment variable to a valid pod name you wish to use.
export HOSTNAME=fabric8-znuj5
e.g. the above uses the pod name for the current fabric8 console.
This lets you pretend to be different pods from the command line when trying it out locally. e.g. run the kansible pod ...
command in 2 shells as different pods, provided the HOSTNAME
values are diferent.
The pod name must be valid as kansible pod ...
command will update the pod to annotate which host its chosen etc.
So to run the above examples type the following:
for fabric8-ansible-spring-boot:
kansible pod -rc hawtapp-demo appservers /opt/cdi-camel-2.2.98-SNAPSHOT-app/bin/run.sh
kansible pod -rc springboot-demo appservers /opt/springboot-camel-2.2.98-SNAPSHOT
If you're like me and have used a Mac for years, you might have forgotten how to work with Windows boxes ;). Here's some tips on how to test things out on the Windows VMs
First install the winrm binary which you can do if you have golang installed via:
go get github.com/masterzen/winrm
Then to connect to one of the Windows VMs from an example, such as the fabric8-ansible-hawtapp you can use:
winrm -hostname 10.10.3.21 -username IEUser -password 'Passw0rd!' 'cmd'
Then you can test if a java process is running via
jps -l
If you wish to kill a java process from its PID you can type:
taskkill /PID 4308 /F
Enjoy!
Just run make release
. This will cross-compile for all supported platforms, create tag & upload tarballs (zip file for Windows) to Github releases for download.
Updating the version is done via make bump
to bump minor version & make bump-patch
to bump patch version. This is necessary as tags are created from the version specified when releasing.