-
Notifications
You must be signed in to change notification settings - Fork 949
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
Add vagrant support for pouch #2168
Conversation
We found this is your first time to contribute to Pouch, @manlge |
Codecov Report
@@ Coverage Diff @@
## master #2168 +/- ##
==========================================
+ Coverage 64.16% 64.44% +0.27%
==========================================
Files 209 209
Lines 16713 16723 +10
==========================================
+ Hits 10724 10777 +53
+ Misses 4648 4621 -27
+ Partials 1341 1325 -16
|
@manlge we have the vagrantfile right. But it's located at |
I think Vagrant file is very convenient for users. To give them a quick and direct experience, I do not think the Vagrant file should be located too deep. So I support on @manlge 's action to put it in top dir. If we still wish to locate it in a second layer of dir, I insist add a link of Vagrant file in Installation or Readme. WDYT? |
@fuweid The hack/vagrant doesn't work when vagrant up ==> pouch-dev-node: Cloning into '/root/.goenv'... hack/vagrant just for developer, doesn't have quick start for users, So I think we can merge committed files to pouch and remove hack/vagrant directory from pouch. |
VAGRANT.md
Outdated
|
||
```bash | ||
vagrant up | ||
vagrant ssh -c "sudo su -l" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo -i?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo su -l (L)
-l Simulate a full login. The environment is discarded except for HOME, SHELL, PATH, TERM, and USER. HOME and SHELL are modified as above. USER is
set to the target login. PATH is set to ``/bin:/usr/bin''. TERM is imported from your current environment. The invoked shell is the target
login's, and su will change directory to the target login's home directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo -i
does same thing without nesting su in sudo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, "sudo -i" is good idea. I'll change it to "sudo -i" next commit.
Vagrantfile
Outdated
# configring environments for pouch | ||
GOPATH=/root/go | ||
apt-get install -y --no-install-recommends build-essential | ||
wget --progress=bar:force:noscroll https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz -O /tmp/go1.10.3.linux-amd64.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use go1.9.1 to build binary right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll change to go1.9.1 next commit.
GO_VERSION=1.9.1
GOPATH=/go
apt-get install -y --no-install-recommends build-essential
wget --progress=bar:force:noscroll https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz -O /tmp/go$GO_VERSION.linux-amd64.tar.gz
tar xf /tmp/go$GO_VERSION.linux-amd64.tar.gz -C /opt/
echo "export GOROOT=/opt/go" >> ~/.bashrc
echo "export GOPATH=$GOPATH" >> ~/.bashrc
cd /usr/bin && find /opt/go/bin -type f | xargs -n1 ln -f -s
Vagrantfile
Outdated
|
||
mkdir -p $GOPATH/src/github.com/alibaba | ||
ln -s /vagrant $GOPATH/src/github.com/alibaba/pouch | ||
cd $GOPATH/src/github.com/alibaba/pouch && make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without install?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think developers sometimes just compile
The installation has been explained in VAGRANT.md
cd ~/go/src/github.com/alibaba/pouch
make DEST_DIR=/usr install
systemctl restart pouch
VAGRANT.md
Outdated
## Build pouch with vagrant | ||
|
||
```bash | ||
export POUCH_BUILD=true # set POUCH_BUILD=true on Windows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you means the export xx=yy
in the ubuntu on window?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vagrant on Windows, "export POUCH_BUILD=true" doesn't support.
Using "set POUCH_BUILD=true" to enable POUCH_BUILD
Signed-off-by: Mark Liu <[email protected]>
@manlge Thanks for your contribution. 🍻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ⅰ. Describe what this PR did
Add Vagrant support for pouch.
Ⅱ. Does this pull request fix one issue?
The commit doesn't fix any issue.
Ⅲ. Why don't you add test cases (unit test/integration test)?
The commit just have scriptfile and Documents.
Ⅳ. Describe how to verify it
Install Vagrant and virtualBox
On MacOS or Linux
export POUCH_BUILD=true
vagrant up
On Windows
set POUCH_BUILD=true
vagrant up
Ⅴ. Special notes for reviews