Skip to content
This repository has been archived by the owner on Feb 2, 2018. It is now read-only.

Commit

Permalink
Vagrantfile updates (#67)
Browse files Browse the repository at this point in the history
* Add dummy SSH key pair for Vagrant environment.

* Vagrantfile: Rebase to fedora/25 boxen.

* Vagrantfile: Use 'sshfs' instead of 'nfs'.

Purportedly more reliable than NFS with libvirt.

* Vagrantfile: Autostart commissaire-clusterexec service.

* docs: Mention vagrant-sshfs in Vagrant section.

* fixup! Vagrantfile: Use 'sshfs' instead of 'nfs'.

* fixup! docs: Mention vagrant-sshfs in Vagrant section.
  • Loading branch information
mbarnes authored and ashcrow committed Dec 6, 2016
1 parent 9b3cf0f commit 0fd8209
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 14 deletions.
29 changes: 19 additions & 10 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Vagrant.configure(2) do |config|

# Development servers server.
config.vm.define "servers" do |servers|
servers.vm.box = "fedora/24-cloud-base"
servers.vm.box = "fedora/25-cloud-base"
servers.vm.provider :libvirt do |domain|
domain.memory = 1024
domain.cpus = 1
Expand Down Expand Up @@ -40,7 +40,7 @@ Vagrant.configure(2) do |config|
# Development Kubernetes server.
# NOTE: This must start after etcd.
config.vm.define "kubernetes", autostart: false do |kubernetes|
kubernetes.vm.box = "fedora/24-cloud-base"
kubernetes.vm.box = "fedora/25-cloud-base"
kubernetes.vm.provider :libvirt do |domain|
domain.memory = 1024
domain.cpus = 1
Expand All @@ -67,7 +67,7 @@ Vagrant.configure(2) do |config|

# Development Node 1
config.vm.define "fedora-cloud" do |node|
node.vm.box = "fedora/24-cloud-base"
node.vm.box = "fedora/25-cloud-base"
node.vm.provider :libvirt do |domain|
domain.memory = 1024
domain.cpus = 1
Expand All @@ -90,13 +90,14 @@ Vagrant.configure(2) do |config|

# Development Node 1
config.vm.define "fedora-atomic" do |node|
node.vm.box = "fedora/24-atomic-host"
node.vm.box = "fedora/25-atomic-host"
node.vm.provider :libvirt do |domain|
domain.memory = 1024
domain.cpus = 1
end
node.vm.network "private_network", ip: "192.168.152.111"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder ".", "/home/vagrant/sync", type: "sshfs"
node.vm.provision "shell", inline: <<-SHELL
echo "==> Setting hostname"
sudo hostnamectl set-hostname fedora-atomic
Expand All @@ -114,16 +115,16 @@ Vagrant.configure(2) do |config|
# Development commissaire server and services
# NOTE: This must start after etcd.
config.vm.define "commissaire", primary: true do |commissaire|
commissaire.vm.box = "fedora/24-cloud-base"
commissaire.vm.box = "fedora/25-cloud-base"
commissaire.vm.provider :libvirt do |domain|
domain.memory = 1024
domain.cpus = 1
end
commissaire.vm.network "private_network", ip: "192.168.152.100"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder ".", "/vagrant/commissaire", mount_options: ['vers=3']
config.vm.synced_folder "../commissaire-http", "/vagrant/commissaire-http", mount_options: ['vers=3']
config.vm.synced_folder "../commissaire-service", "/vagrant/commissaire-service", mount_options: ['vers=3']
config.vm.synced_folder ".", "/vagrant/commissaire", type: "sshfs"
config.vm.synced_folder "../commissaire-http", "/vagrant/commissaire-http", type: "sshfs"
config.vm.synced_folder "../commissaire-service", "/vagrant/commissaire-service", type: "sshfs"
commissaire.vm.provision "shell", inline: <<-SHELL
echo "==> Setting hostname"
sudo hostnamectl set-hostname commissaire
Expand Down Expand Up @@ -162,7 +163,11 @@ Vagrant.configure(2) do |config|
sudo sed -i 's|"server_url": "http://127.0.0.1:2379"|"server_url": "http://192.168.152.101:2379"|g' /etc/commissaire/storage.conf
sudo sed -i 's|^ExecStart=.*|ExecStart=/bin/bash -c ". /home/vagrant/commissaire_env/bin/activate \\&\\& commissaire-storage-service -c /etc/commissaire/storage.conf --bus-uri redis://192.168.152.101:6379"|' /etc/systemd/system/commissaire-storage.service
echo "===> Setting up commissaire-investigator-service to autostart"
echo "===> Setting up commissaire-clusterexec service to autostart"
sudo cp /vagrant/commissaire-service/conf/systemd/commissaire-clusterexec.service /etc/systemd/system/commissaire-clusterexec.service
sudo sed -i 's|^ExecStart=.*|ExecStart=/bin/bash -c ". /home/vagrant/commissaire_env/bin/activate \\&\\& commissaire-clusterexec-service --bus-uri redis://192.168.152.101:6379"|' /etc/systemd/system/commissaire-clusterexec.service
echo "===> Setting up commissaire-investigator service to autostart"
sudo cp /vagrant/commissaire-service/conf/systemd/commissaire-investigator.service /etc/systemd/system/commissaire-investigator.service
sudo sed -i 's|^ExecStart=.*|ExecStart=/bin/bash -c ". /home/vagrant/commissaire_env/bin/activate \\&\\& commissaire-investigator-service --bus-uri redis://192.168.152.101:6379"|' /etc/systemd/system/commissaire-investigator.service
Expand All @@ -179,7 +184,11 @@ Vagrant.configure(2) do |config|
sudo systemctl enable commissaire-storage
sudo systemctl start commissaire-storage
echo "===> Starting commissaire-investigator"
echo "===> Starting commissaire-clusterexec service"
sudo systemctl enable commissaire-clusterexec
sudo systemctl start commissaire-clusterexec
echo "===> Starting commissaire-investigator service"
sudo systemctl enable commissaire-investigator
sudo systemctl start commissaire-investigator
Expand Down
13 changes: 9 additions & 4 deletions doc/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Vagrant
A ``Vagrantfile`` is provided which will give you a full local development setup.

To run the vagrant development environment make sure you have a supported
virtualization system, vagrant installed, and have all commissaire projects checked
out in the parent folder as the commissaire vagrant box will attempt to mount them
over NFS.
virtualization system, vagrant and vagrant-sshfs installed, and have all
commissaire projects checked out in the parent folder as the commissaire
vagrant box will attempt to mount them over SSH.

.. code-block:: shell
Expand All @@ -52,7 +52,12 @@ virtualization system as well as vagrant installed and execute ``vagrant up``.

.. note::

On some Linux versions you may have to follow extra steps for vagrant. Here is an example for using vagrant with NFS on `Fedora <https://developer.fedoraproject.org/tools/vagrant/vagrant-nfs.html>`_.
The ``fedora-atomic`` host currently requires a manual work-around to
mount the shared folder at ``/home/vagrant/sync``. After the box is up
the first time, run ``vagrant ssh fedora-atomic`` to log into the virtual
machine, then run ``sudo rpm-ostree install fuse-sshfs``. Exit back out
to the host machine and restart the virtual machine with ``vagrant reload
fedora-atomic``.

.. note::

Expand Down
27 changes: 27 additions & 0 deletions features/id_rsa
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpgIBAAKCAQEA2+66QbdSa4Jva+CcQlh4FGCVA3EZ3akgwNjMy1UQhvdoZySr
eLvlQW1aA9ZYpTUOk8x4lU2NwvjTEp7r32IY5zTDMdnyirAGSaG4GTG1GJI7u8wB
/IZ8iegpVaGAfEaWLwUbuPplDHHst0I+40mWdAznJSZ0I/6d0H31EEsgkx4v3+AK
MxwW7gsfCQkIr3tWKZKWn/gX3lQzl7pSRhxLDh8h94WwhmZVhTWj7jFkInnc4jKI
SrIASI3MVM0EvTrNUDFVTVZ/VEsDKD9BSg/1kdMVrPw2pv0kpnhd/cfWkMNRl6jV
56U/VgDZQLB71ZhU8X5zsIx6O4tA+RksB7f7aQIDAQABAoIBAQDE7L/XgccJvpP3
uvkPKtnyHPywRUAMypgqNLVCxxryTmssF5h1lYBUEg7MasuauaQg0K+TuApb7qJI
BQZcUSDNPOAeLfFPHweyPFx0Kp7lrmJP5/5LVzwB21/Pbbl3DVkCJwfInGOIPiXf
fTCEIOrXZIo/KGxLons6KN4aRbqYHoDrY4XAxgI5y30DG8PVrvpyyHozogkMGnPT
ZBBx/VGX4W220PycQGC/4QWLoVqywet7fIFAs9EuKVRB3ByymAkVoILlP3isLX5w
qCtyQUPcFgneaZ/SZ5tMbraMd8zHR81v7M4ZzrXAq5gxbc3s8yQC1xJyrVhaCRY7
+7E4iSwlAoGBAPoKYplhMtPXGIWuk+g5KknO1HFx77Y+wCxZuYxtaReodeIwoOpM
Rqw/seAFaOe6rA2lZsyPy8d+V5jrGoICs4tbQTuIcsylzIrA4YI6rQzKP5Fg2Edi
xpcvwSSwBqFaJe/dYNIuFnzBTpN7vaONB6sUNvDWI6/VjdV/Lp9sCdOzAoGBAOEs
o58NnkzOUiGmiZDRdu/Fnglqer9dnBCAEN8WjJgF9rQ3nFYahFPY0EP05gBt8ZlY
Se9VgizuuWYhnOnbUY9nEaEMkbnCXWP/1vkVtYBAOTvMWqqalNZ3gVrbAAlaCUun
fH3metjMOdygfZlnBjaSCIphM1lYV4XvVufoMZZzAoGBAJ8609WHP34GQXiIV2qQ
VOzRyRpBi30McwcLUI0r87v8LK4Rd7gdQPhaS6U07Lx9dSnvhgqJHCV7wL8CIUxf
+gSp5V3LJAhNIXfPIwzy3tcBSQAEo1a6gWswHxiE/IPuS7B30zul2+4wkCB9saOg
oRyCcAZo6CsGnR8zsfYWMB/fAoGBANsP4IbGavDx8DlImaDIB1uw99TVQGGYIlJz
JPbEKzdi5eXiDDhAR+iCj+rtAC3+yAKVQCiVGbW48amIne1tLuXCMgZqAgOkMdMt
fOiK1C7XTFb+sl4zUQVs8e2ADYMLkuuFH7okVfNAjDI1+Lsa3ZKNc72cXqZXKZ7l
f7jRzhw9AoGBALH9wjW1x3QFm6rS8rw9d4zAz6914B+5VwxFCT5HI9C66IZC18F5
zOvb3zSscn8vR4KnqxiBTn12N7bC3KI8haxS2Pc2MGcbCYXUZx9/hd2FV4j9yio9
sVHImlfrqpruSzcsOAT9Wi5eaYaC7qVrDeZITxQ/SmU2K6Ln4J5Pt6pn
-----END RSA PRIVATE KEY-----
1 change: 1 addition & 0 deletions features/id_rsa.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDb7rpBt1Jrgm9r4JxCWHgUYJUDcRndqSDA2MzLVRCG92hnJKt4u+VBbVoD1lilNQ6TzHiVTY3C+NMSnuvfYhjnNMMx2fKKsAZJobgZMbUYkju7zAH8hnyJ6ClVoYB8RpYvBRu4+mUMcey3Qj7jSZZ0DOclJnQj/p3QffUQSyCTHi/f4AozHBbuCx8JCQive1Ypkpaf+BfeVDOXulJGHEsOHyH3hbCGZlWFNaPuMWQiedziMohKsgBIjcxUzQS9Os1QMVVNVn9USwMoP0FKD/WR0xWs/Dam/SSmeF39x9aQw1GXqNXnpT9WANlAsHvVmFTxfnOwjHo7i0D5GSwHt/tp vagrant@fedora-atomic

0 comments on commit 0fd8209

Please sign in to comment.