Skip to content

Commit

Permalink
Bump the minimum Go version to 1.9.
Browse files Browse the repository at this point in the history
This is tracked here: vitessio#3219

Note that this also triggers a Debian version upgrade to their latest
stable version "stretch" which was released this summer.

This required several additional changes and cleanups:

- Remove outdated GO15VENDOREXPERIMENT.
- Docker: Upgrade Java to 8 (from 7).
- Docker: Upgrade PHP to 7 (from 5).
- Docker: Use "pip" from distribution and do not install it ourselves.
- Docker: PHP: Use "pecl install grpc" and no longer compile it ourselves. Relevant parts in travis/install_grpc.sh have been removed.
- Docker: Do no longer install etcd and consule in the common image because we call bootstrap.sh when building the flavored image and that installs these two as well.
- travis/install_grpc.sh changes:
  - Do no longer compile gRPC because for PHP and Python we can use other ways to install the shared library.
  - Do no longer compile protobuf. Instead, download pre-compiled "protoc" binary in bootstrap.sh.
  - Updated Python and PHP versions to 1.6 as we did earlier for Go.
  • Loading branch information
michael-berlin committed Sep 22, 2017
1 parent 8b1cd5f commit f109d14
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 173 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dist: precise
sudo: false
language: go
go:
- 1.8
- 1.9
go_import_path: github.com/youtube/vitess
addons:
apt:
Expand Down
18 changes: 18 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@ mkdir -p $VTROOT/vthook
echo "Updating git submodules..."
git submodule update --init

# Install "protoc" protobuf compiler binary.
protoc_version=3.4.0
protoc_dist=$VTROOT/dist/protoc
protoc_version_file=$protoc_dist/version
if [[ -f $protoc_version_file && "$(cat $protoc_version_file)" == "$protoc_version" ]]; then
echo "skipping protoc install. remove $protoc_version_file to force re-install."
else
rm -rf $protoc_dist
mkdir -p $protoc_dist
download_url=https://github.com/google/protobuf/releases/download/v${protoc_version}/protoc-${protoc_version}-linux-x86_64.zip
(cd $protoc_dist && \
wget $download_url && \
unzip protoc-${protoc_version}-linux-x86_64.zip)
[ $? -eq 0 ] || fail "protoc download failed"
echo "$protoc_version" > $protoc_version_file
fi
ln -snf $protoc_dist/bin/protoc $VTROOT/bin/protoc

# install zookeeper
zk_ver=3.4.6
zk_dist=$VTROOT/dist/vt-zookeeper-$zk_ver
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"php": ">=5.5.0",
"stanley-cheung/protobuf-php": "v0.6",
"google/auth": "v0.10",
"grpc/grpc": "v1.0.0"
"grpc/grpc": "v1.6.0"
},
"autoload": {
"psr-4": {
Expand Down
83 changes: 44 additions & 39 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions dev.env
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ mkdir -p $VTDATAROOT

export VTPORTSTART=15000

export GO15VENDOREXPERIMENT=1

for pypath in $(find $VTROOT/dist -name site-packages -or -name dist-packages | grep -v src/python/grpcio/.tox/py27/lib/python2.7/site-packages)
do
export PYTHONPATH=$(prepend_path $PYTHONPATH $pypath)
Expand Down
2 changes: 1 addition & 1 deletion doc/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ OS X 10.11 (El Capitan) should work as well, the installation instructions are b

In addition, Vitess requires the software and libraries listed below.

1. [Install Go 1.8+](http://golang.org/doc/install).
1. [Install Go 1.9+](http://golang.org/doc/install).

2. Install [MariaDB 10.0](https://downloads.mariadb.org/) or
[MySQL 5.6](http://dev.mysql.com/downloads/mysql). You can use any
Expand Down
6 changes: 3 additions & 3 deletions doc/GettingStartedKubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ The `kubectl` steps will apply to any Kubernetes cluster.

## Prerequisites

To complete the exercise in this guide, you must locally install Go 1.8+,
To complete the exercise in this guide, you must locally install Go 1.9+,
Vitess' `vtctlclient` tool, and Google Cloud SDK. The
following sections explain how to set these up in your environment.

### Install Go 1.8+
### Install Go 1.9+

You need to install [Go 1.8+](http://golang.org/doc/install) to build the
You need to install [Go 1.9+](http://golang.org/doc/install) to build the
`vtctlclient` tool, which issues commands to Vitess.

After installing Go, make sure your `GOPATH` environment
Expand Down
Loading

0 comments on commit f109d14

Please sign in to comment.