Permalink
Browse files

IPv6: Bookinfo sample

Modify bookinfo to use IPv6 any address to run in IPv6 only environment.
Changes to build_push_update_images.sh to use developer's docker hub
area, so that customized version can be used.  To upstream, this should
be made configurable.
  • Loading branch information...
pmichali committed Mar 6, 2018
1 parent b7302ab commit 4ea619de8383ddcd8c698be0690a02378271b0c9
@@ -23,8 +23,16 @@ if [ "$#" -ne 1 ]; then
fi
VERSION=$1
echo "Building images"
src/build-services.sh $VERSION
IMAGES=$(docker images -f reference=istio/examples-bookinfo*:$VERSION --format "{{.Repository}}:$VERSION")
for IMAGE in $IMAGES; do docker push $IMAGE; done
sed -i "s/\(istio\/examples-bookinfo-.*\):[[:digit:]]\.[[:digit:]]\.[[:digit:]]/\1:$VERSION/g" */bookinfo*.yaml
REMOTES=`echo ${IMAGES} | sed "s/istio\///g"`
echo "Tagging and pushing to repo $HUB"
for IMAGE in $IMAGES; do
remote=`echo $IMAGE | sed "s/istio\///"`
docker tag $IMAGE $HUB/$remote
docker push $HUB/$remote
done
echo "Modifying image location (${HUB}) in YAML files"
sed -i "s/istio\(\/examples-bookinfo-.*\):[[:digit:]]\.[[:digit:]]\.[[:digit:]]/docker.io\/$GITHUB_USER\1:$VERSION/g" */bookinfo*.yaml
@@ -25,7 +25,7 @@
port = Integer(ARGV[0])
server = WEBrick::HTTPServer.new :BindAddress => '0.0.0.0', :Port => port
server = WEBrick::HTTPServer.new :BindAddress => '::', :Port => port
trap 'INT' do server.shutdown end
@@ -254,5 +254,5 @@ def write(self, data):
sys.stderr = Writer('stderr.log')
sys.stdout = Writer('stdout.log')
print "start at port %s" % (p)
app.run(host='0.0.0.0', port=p, debug=True, threaded=True)
app.run(host='::', port=p, debug=True, threaded=True)
@@ -140,5 +140,5 @@ function handleRequest (request, response) {
var server = http.createServer(handleRequest)
server.listen(port, function () {
console.log('Server listening on: http://0.0.0.0:%s', port)
console.log('Server listening on: http://[::]:%s', port)
})

0 comments on commit 4ea619d

Please sign in to comment.