Hello
A hello app poorly written in golang.
Switch to master branch for code source.
Use the vagrant file to provision your local setup,
assuming that you have installed Vagrant and Virtualbox.
Links:
https://www.vagrantup.com/downloads
https://www.virtualbox.org/
Vagrant, virtualbox as a provider
Vagrant is a software of 'infrastructure' automation. Notice the hyphens there,
since it covers most of today's environments, i.e VirtualBox, Vmware, HyperV, Docker, Openstack...
link to vagrant's default providers: https://www.vagrantup.com/docs/providers
Vagrant enables the quick creation/retirement of technical environments, by structuring the required ressources in a configuration file.
The resources are defined in a Vagrantfile that you can spawn in your working directory by running :
vagrant init
The file uses ruby syntax to provision a "box" on a specified provider.
We will provision a Centos virtual machine, running by VirtualBox.
The Vagrantfile defines the ressources to run two vms, to run the master-node :
vagrant up master-node
The first execution will take some time, because of a system update and an installation of 4 packages, ensured by provision section.
see vagrant provision.
To validate, get the vm's status by running :
vagrant status master-node
To ssh into the vm, using the ssh keys generated by vagrant(also renewed if needed), run:
vagrant ssh master-node
Once you are logged in, feel free to enable authentication by password on the ssh daemon ( /etc/ssh/ ) to use a terminal of your likings.
The rest of the workshop resides in the master branch.
=======
go-server
Demo subject of buildah podman & skopeo.
Commands
To build an image using Buildah from a Dockerfile v2 :
buildah bud -f Dockerfile -t <img_name>:<tag>
To inspect created image using buildah:
buildah images
Get the ID from previous command and run:
buildah inspect <ID>
Run a container out of the image using the pod manager:
podman run -d -it -p 8081 <img_ID>
Get exposed port:
podman ps
Try curl or your browser for a greeting back.