Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume moving tutorial - fixes 131 #411

Merged
merged 11 commits into from
Aug 5, 2014
Merged

Conversation

itamarst
Copy link
Contributor

@itamarst itamarst commented Aug 1, 2014

Fixes #131.

In order for tutorial to actually work #405 and #410 will need to be merged, so might want to hold off on review until those are in.

@exarkun exarkun added the review label Aug 1, 2014
@itamarst itamarst added ready and removed ready labels Aug 1, 2014
@itamarst itamarst added this to the Release 0.1 milestone Aug 1, 2014
@wallrj
Copy link
Contributor

wallrj commented Aug 4, 2014

I began the tutorial again while reviewing #396 but got an error which I think may be caused by the new mongo docker image in this branch and which might be remedied by #392

Pulling repository dockerfile/mongodb

Stderr from the command:

Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
2014/08/04 03:08:08 Error: write /tmp/docker-export-317438209/9c1219bb985cb5ceb0a602ad943c9dd5b83cf0f16d3cd05730113fe0af37d0be/layer.tar: no space left on device

@@ -57,6 +57,10 @@ else
fi
fi

mkdir /tmp/dockerbuild
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/tmp ran out of space for me when I ran vagrant up

Stderr from the command:

Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
2014/08/04 03:08:08 Error: write /tmp/docker-export-317438209/9c1219bb985cb5ceb0a602ad943c9dd5b83cf0f16d3cd05730113fe0af37d0be/layer.tar: no space left on device

I changed it to /var/tmp and the vagrant build was able to complete.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it didn't finish. The previously saved image was empty and that empty image got cached by vagrant-cachier.

Trying again.

@wallrj
Copy link
Contributor

wallrj commented Aug 4, 2014

I made the following changes to the tutorial vagrantfile.

  • set -x is quite useful to be able to see the cause of errors in bootstrap.sh
  • systemctl restart docker seems to be necessary for the new tmpdir to take effect. I guess on my base os, docker is already running.

Maybe these things should be addressed in other tickets...

$ git diff
diff --git a/docs/tutorial/Vagrantfile b/docs/tutorial/Vagrantfile
index 1fa8197..76b4ac1 100644
--- a/docs/tutorial/Vagrantfile
+++ b/docs/tutorial/Vagrantfile
@@ -9,7 +9,7 @@ VAGRANTFILE_API_VERSION = "2"


 $bootstrap = <<SCRIPT
-set -e
+set -ex


 yum install -y zfs
@@ -26,7 +26,7 @@ echo "# Flocker-defined alternate temporary path to provide more temporary space
 echo "TMPDIR=/var/tmp" >> /etc/sysconfig/docker

 systemctl enable docker
-systemctl start docker
+systemctl restart docker
 systemctl enable geard
 systemctl start geard

@@ -57,8 +57,8 @@ else
   fi
 fi

-mkdir /tmp/dockerbuild
-cd /tmp/dockerbuild
+mkdir /var/tmp/dockerbuild
+cd /var/tmp/dockerbuild
 echo "FROM dockerfile/mongodb\nCMD mongod --dbpath=/data --noprealloc --smallfiles" > Dockerfile
 docker build --tag mongodb-tutorial .
 SCRIPT
@@ -68,6 +68,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
   config.vm.provision :file, :source => "clusterhq-flocker.repo", :destination => "clusterhq-flocker.rep
   config.vm.provision :shell, :inline => $bootstrap, :privileged => true

+  config.vm.provider "virtualbox" do |v|
+    v.memory = 1024
+  end
+
   if Vagrant.has_plugin?("vagrant-cachier")
     config.cache.scope = :box
   end

@wallrj
Copy link
Contributor

wallrj commented Aug 4, 2014

Thanks @itamarst I've followed the volume tutorial twice now once with master (where it worked under certain circumstances) and again with the gear async remove improvements from #410, where the steps worked perfectly.

I had some trouble setting up the tutorial environment until I modified the systemctl reload docker and /var/tmp lines in the diff above; so I suggest applying those.

Drop the vm memory change, unless you think it's worth keeping.

Then please merge. That'll allow the guys in Bristol to do further testing tomorrow morning and hopefully reveal more bugs.

wallrj added a commit that referenced this pull request Aug 5, 2014
@wallrj wallrj merged commit 64d76c1 into master Aug 5, 2014
@wallrj wallrj deleted the eppur-si-muove-tutorial-131 branch August 5, 2014 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Worked out example: a publicly facing data-storing application moves across nodes
3 participants