Skip to content

Commit

Permalink
Remove vagrant and rpm deprecated info
Browse files Browse the repository at this point in the history
  • Loading branch information
MalloZup committed Jun 30, 2020
1 parent 71a31cc commit 3e5b0bc
Show file tree
Hide file tree
Showing 32 changed files with 1 addition and 945 deletions.
96 changes: 1 addition & 95 deletions README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -290,102 +290,8 @@ your certificate.


== Hacking Hawk ==
=== Preconfigured Vagrant environment

To hack on Hawk we recommend to use the vagrant setup. There is a
Vagrantfile attached, which creates a three-node cluster with a basic
configuration suitable for development and testing.

To be prepared for getting our vagrant setup running you need to follow
some steps.

* Install the vagrant package from http://www.vagrantup.com/downloads.html,
the minimal version requirement is +>= 1.7.0+ in order to work properly
with openSUSE/SLED workstation setups.
* Install +virtualbox+, we assume you know how to do that on your OS. If
you prefer +libvirt+ you can use that as well.

Out of the box, +vagrant+ is configured to synchronize the working
folder to +/vagrant+ in the virtual machines using NFS. For this to
work properly, the +vagrant-bindfs+ plugin is necessary.

Install it using the following command:

----------
# vagrant plugin install vagrant-bindfs
----------


* If you plan to use +libvirt+ as provider make sure you have the libvirt-plugin installed:

----------
# vagrant plugin install vagrant-libvirt
----------

* You need to fetch the git submodules to finish your development setup:

----------
# git submodule update --init --recursive
----------

This is all you need to prepare initially to set up the vagrant environment,
now you can simply start the virtual machine with +vagrant up+ and start
an ssh session with +vagrant ssh webui+ based on +virtualbox+. To start the
virtual machines on +libvirt+ you have to append +--provider=libvirt+ to the
above commands, e.g. +vagrant up --provider=libvirt+. If you want to access
the source within the virtual machine you have to switch to the +/vagrant+
directory.

=== Web server instances
You can access the Hawk web interface based on the git source through
+http://localhost:3000+ now. If you want to access the version installed
through packages you can reach it through +https://localhost:7630+.

In fact, within the Vagrant environment, there are two instances of the Puma web
server running. The first one is accessible through +https://localhost:7630+, with
+/srv/www/hawk+ as the root directory. This instance is launched by default as a
production server when installing hawk through the package manager or when
launching the vagrant environment. It is used to monitor and manage the cluster
in the real production environment. Note also that this puma server instance is
running automatically at startup through a systemd script.

The commands used to control this server are:

----------
$ vagrant ssh webui
vagrant@webui:~> sudo systemctl start hawk
vagrant@webui:~> sudo systemctl stop hawk
vagrant@webui:~> sudo systemctl restart hawk
vagrant@webui:~> sudo systemctl status hawk
----------

The other instance is used for development purposes. Its root directory is
+/vagrant/hawk/hawk+. That's because the /vagrant folder is synced with the host
machine's working folder (the local git repository), so any changes in that folder
is detected instantly by this server instance in the guest machine.
This instance is accessible through +http://localhost:3000+.
Also, You can find installed on the development VM a script called +hawk+
(hawk/bin/hawk), which can be used to control the development instance of hawk:

----------
$ vagrant ssh webui
vagrant@webui:~> hawk status
vagrant@webui:~> hawk log
vagrant@webui:~> hawk start
vagrant@webui:~> hawk stop
vagrant@webui:~> hawk restart
vagrant@webui:~> hawk server
----------

Because Hawk is multi-threaded, the Rails asset auto-loading doesn't work properly.
Unfortunately this means that you need to run +hawk restart+ after changing
most files. The exception is the HAML view files which update automatically.

If the development hawk instance isn't running, it can be started using this command:

----------
webui:/vagrant/hawk # sudo -u vagrant bin/rails s
----------
Use https://github.com/SUSE/pacemaker-deploy for deploying hawk

=== Puma server configuration

Expand Down
102 changes: 0 additions & 102 deletions Vagrantfile

This file was deleted.

11 changes: 0 additions & 11 deletions rpm/filter-requires.sh

This file was deleted.

12 changes: 0 additions & 12 deletions rpm/hawk-rpmlintrc

This file was deleted.

Loading

0 comments on commit 3e5b0bc

Please sign in to comment.