Tuesday, February 5, 2019

Running istio with docker-compose and consul

0 lượt xem comment 0 comments

In my previous post, I showed how o install and run istio locally with minikube. However, if you don't have 8GB of ram FREE it might not be a good FIT for you. Today I want to show a lightweight approach for a local environment where we can run Istio with Docker, Docker-Compose, and Consul.

I will be doing more posts about istio, this week, talking about how to run Istio on AWS for instance. But going back to this post.

In order to have this solution working in your machine you have some pre-requirements such as: have docker installed, docker-compose installed and kubectl installed.  Running with consult and docker-compose is way easier than running with minikube/kubernetes however you are not as close as the production topology. For istio, we will be using istio version 1.0.5 Let's get started!




Installing and Running Istio in Docker-Compose and Consol

Download Istio(1.0.5)

git clone https://github.com/istio/istio.git
cd istio/
git checkout tags/1.0.5

Install Istio Docker

export DOCKER_GATEWAY=172.28.0.1:
docker-compose -f install/consul/istio.yaml up -d
kubectl config set-context istio --cluster=istio
kubectl config set-cluster istio --server=http://localhost:8080
kubectl config use-context istio

Make sure PILOT is running with docker ps otherwise run previous command docker-compose -f install/consul/istio.yaml up -d

Run bookinfo app

docker-compose -f samples/bookinfo/platform/consul/bookinfo.yaml up -d
docker-compose -f samples/bookinfo/platform/consul/bookinfo.sidecars.yaml up -d

Test the installation

export GATEWAY_URL=localhost:9081
curl -o /dev/null -s -w "%{http_code}\n" http://$GATEWAY_URL/productpage
xdg-open http://$GATEWAY_URL

Bringing the Containers down

docker-compose -f install/consul/istio.yaml down
docker-compose -f samples/bookinfo/platform/consul/bookinfo.yaml down
docker rm -f $(docker ps -a -q); docker rmi $(docker images -q)


Cheers,
Diego Pacheco



Tags: command,

comment 0 comments

Chuyên mục văn hoá giải trí của VnExpress

.

© 2017 www.blogthuthuatwin10.com

Tầng 5, Tòa nhà FPT Cầu Giấy, phố Duy Tân, Phường Dịch Vọng Hậu, Quận Cầu Giấy, Hà Nội
Email: nguyenanhtuan2401@gmail.com
Điện thoại: 0908 562 750 ext 4548; Liên hệ quảng cáo: 4567.