Skip to content

Commit ba3a7cb

Browse files
committed
Update
1 parent 6eeaef6 commit ba3a7cb

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

dev.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,20 @@
1111
1. To suspend the VM, run `vagrant halt`. You can run `vagrant up` later to resume it.
1212
1. To completely destroy the VM and re-provision it, run `vagrant destroy` and `vagrant up`.
1313

14-
We have provided an install shell script for you to get an easy initialization. You can run it with:
14+
We provided a shell script to start a VM running the SQLFlow service.
15+
16+
```bash
17+
./play.sh
18+
```
19+
20+
If you have a slow Internet connection to Vagrant Cloud, you might want to
21+
download the Ubuntu VirtualBox image manually from some mirror sites into
22+
`~/.cache/sqlflow/` before running the above script.
23+
1524
```bash
16-
./install.sh [inchina]
25+
wget -c -nv --show-progress -O downloads/ubuntu-bionic64.box \
26+
"https://mirrors.ustc.edu.cn/ubuntu-cloud-images/bionic/current/bionic-server-cloudimg-amd64-vagrant.box"
1727
```
18-
It will guide you to setup the vagrant environment. Especially, for developers in China, you may add the `inchina` param to download the ubuntu box for vagrant beforehand. After the initialization, you will have a virtual machine named `playground_default...` in VirtualBox which is already provisioned. You may follow the direction of the output to get things done.
1928

2029
### For Releaser
2130

install.bash

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515

1616
set -e
1717

18-
if [[ "$1" == "inchina" ]]; then
19-
export WE_ARE_IN_CHINA=true
20-
fi
21-
2218
echo
2319
echo "Welcome to SQLFlow playground!"
2420
echo
@@ -43,16 +39,10 @@ if [[ -z "$(vagrant plugin list | grep -o 'vagrant-disksize')" ]]; then
4339
vagrant plugin install vagrant-disksize
4440
fi
4541

46-
if [[ "$WE_ARE_IN_CHINA" ]]; then
47-
if [[ -z "$(vagrant box list | grep -o ubuntu/bionic64)" ]]; then
48-
echo "Download ubuntu box beforehand..."
49-
mkdir -p downloads
50-
# try with https://mirrors.ustc.edu.cn/ if below not work
51-
wget -c -nv --show-progress -O downloads/ubuntu-bionic64.box "https://mirrors.ustc.edu.cn/ubuntu-cloud-images/bionic/current/bionic-server-cloudimg-amd64-vagrant.box"
52-
vagrant box add ubuntu/bionic64 downloads/ubuntu-bionic64.box
53-
fi
42+
CACHED_BOX="$HOME/.cache/sqlflow/ubuntu-bionic64.box"
43+
if [[ -f $CACHED_BOX ]]; then
44+
vagrant box add ubuntu/bionic64 $CACHED_BOX
5445
fi
5546

5647
echo "Start and provision the playgound now..."
5748
vagrant up
58-

0 commit comments

Comments
 (0)