Skip to content
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 OAP+Istio(mixer) to CI pipeline #3904

Merged
merged 81 commits into from Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
3dd0284
update helm version and open pull_request
innerpeacez Nov 20, 2019
8018bec
Merge branch 'master' into ci-pipeline
wu-sheng Nov 21, 2019
820bc34
update helm version
innerpeacez Nov 21, 2019
0d55214
Merge branch 'master' of https://github.com/apache/skywalking into ci…
innerpeacez Nov 21, 2019
0ab893f
apt install openjdk8
innerpeacez Nov 21, 2019
f05911c
Merge branch 'ci-pipeline' of https://github.com/innerpeacez/skywalki…
innerpeacez Nov 21, 2019
0f169e2
submodule sync
innerpeacez Nov 21, 2019
01f758c
submodule action
innerpeacez Nov 21, 2019
f1a10b0
compile by makefile
innerpeacez Nov 21, 2019
e7392cf
make build.all
innerpeacez Nov 21, 2019
e37b951
update helm version
innerpeacez Nov 21, 2019
855fc3a
mv scripts position
innerpeacez Nov 21, 2019
2cc98ac
bash
innerpeacez Nov 21, 2019
93f3e63
istio install
innerpeacez Nov 21, 2019
4a66586
timeout
innerpeacez Nov 21, 2019
0af3754
test timeout
innerpeacez Nov 21, 2019
947bd4b
timeout test
innerpeacez Nov 21, 2019
61e9e58
timeout test
innerpeacez Nov 21, 2019
4ec5a40
timeout test
innerpeacez Nov 21, 2019
2611537
get event
innerpeacez Nov 21, 2019
473d6bd
close HPA
innerpeacez Nov 22, 2019
d972a6c
istio hpa
innerpeacez Nov 22, 2019
83ecabd
resource request close
innerpeacez Nov 22, 2019
9993b89
resource null
innerpeacez Nov 22, 2019
0d4d994
Merge branch 'master' of https://github.com/apache/skywalking into ci…
innerpeacez Nov 22, 2019
b54e3ea
install SW and ES
innerpeacez Nov 22, 2019
ec56a9d
oap replicas 1
innerpeacez Nov 22, 2019
3f694c6
Merge branch 'master' of https://github.com/apache/skywalking into ci…
innerpeacez Nov 22, 2019
eea6f81
install SW and ES and bookinfo test
innerpeacez Nov 22, 2019
e73a901
istio
innerpeacez Nov 22, 2019
c95f1f7
istio
innerpeacez Nov 22, 2019
9eba59f
test
innerpeacez Nov 22, 2019
d4b8bba
test
innerpeacez Nov 22, 2019
cf5518f
test
innerpeacez Nov 22, 2019
04060e3
test
innerpeacez Nov 22, 2019
f81b0b7
test
innerpeacez Nov 22, 2019
7c2f153
test
innerpeacez Nov 23, 2019
9e2a171
Merge branch 'master' into ci-pipeline
wu-sheng Nov 25, 2019
cd4cd35
test
innerpeacez Nov 25, 2019
02e0e17
Merge branch 'master' of https://github.com/apache/skywalking into ci…
innerpeacez Nov 25, 2019
1dc25c4
Merge branch 'ci-pipeline' of https://github.com/innerpeacez/skywalki…
innerpeacez Nov 25, 2019
9cbbef6
test
innerpeacez Nov 25, 2019
1fe9cc6
test
innerpeacez Nov 25, 2019
42235cd
es test
innerpeacez Nov 26, 2019
8bf808e
test es
innerpeacez Nov 26, 2019
2519f9e
es test
innerpeacez Nov 26, 2019
84e16cb
test es
innerpeacez Nov 26, 2019
73c71f8
Merge branch 'master' of https://github.com/apache/skywalking into ci…
innerpeacez Nov 26, 2019
9aa82d9
demo test
innerpeacez Nov 26, 2019
999a593
test demo
innerpeacez Nov 26, 2019
850c606
demo test
innerpeacez Nov 26, 2019
05c9eb8
demo test
innerpeacez Nov 26, 2019
99c9b40
install SW and ES
innerpeacez Nov 26, 2019
e973be3
resources requests and limits
innerpeacez Nov 27, 2019
8fe952b
test
innerpeacez Nov 27, 2019
fdd2e4d
test
innerpeacez Nov 27, 2019
b81acf5
test
innerpeacez Nov 27, 2019
ab6d908
test
innerpeacez Nov 27, 2019
c5deb8b
test
innerpeacez Nov 28, 2019
dd4af1f
test
innerpeacez Nov 28, 2019
af2be14
test
innerpeacez Nov 28, 2019
4625155
test
innerpeacez Nov 28, 2019
b4c0236
test
innerpeacez Nov 29, 2019
33ec5b8
test
innerpeacez Nov 29, 2019
50b4b27
test
innerpeacez Nov 29, 2019
4b10b57
all install run
innerpeacez Nov 29, 2019
06aca52
Merge branch 'master' into ci-pipeline
wu-sheng Nov 29, 2019
136e79c
Merge branch 'master' of https://github.com/apache/skywalking into ci…
innerpeacez Nov 29, 2019
4d276a2
Merge branch 'ci-pipeline' of https://github.com/innerpeacez/skywalki…
innerpeacez Nov 29, 2019
7eccfc5
oap image
innerpeacez Nov 29, 2019
441d782
image tag
innerpeacez Nov 29, 2019
7bfea73
image
innerpeacez Nov 29, 2019
609ac28
image tag
innerpeacez Nov 29, 2019
64307db
Merge branch 'master' into ci-pipeline
wu-sheng Nov 29, 2019
5a7e7b9
Merge branch 'master' of https://github.com/apache/skywalking into ci…
innerpeacez Nov 29, 2019
82b4ed4
Merge branch 'ci-pipeline' of https://github.com/innerpeacez/skywalki…
innerpeacez Nov 29, 2019
ffa4990
update tag
innerpeacez Nov 29, 2019
562bfb1
image tag
innerpeacez Nov 29, 2019
b65f1b1
image tag
innerpeacez Nov 29, 2019
ed24277
image tag
innerpeacez Nov 29, 2019
9d056aa
Merge branch 'master' of https://github.com/apache/skywalking into ci…
innerpeacez Dec 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/istio-mixer-ci.yaml
Expand Up @@ -18,23 +18,32 @@ name: istio-mixer-ci

on: [pull_request]
env:
SCRIPTS_DIR: ./test/scripts
SCRIPTS_DIR: ./test/e2e-mesh/e2e-istio/scripts
LOG_DIR: /tmp/skywalking
INSTALL_SCRIPTS_DIR: ./install/deploy
jobs:
build:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v1
- name: Prepare enviroment
run: |
bash ./test/scripts/pre.sh
bash ${SCRIPTS_DIR}/pre.sh
mkdir -p ${LOG_DIR}
- name: Start minikube
run: bash ${SCRIPTS_DIR}/minikube.sh start > ${LOG_DIR}/minikube-start-log.txt 2>&1 &
- name: Wating minikube ready
run: bash ${SCRIPTS_DIR}/minikube.sh wait
- name: Setup tunnel
run: minikube tunnel --log_dir=${LOG_DIR} &
- name: Compile all and Build docker image
run: bash ${SCRIPTS_DIR}/compile_build.sh
- name: Istio install
run: bash ${INSTALL_SCRIPTS_DIR}/istio-deploy.sh
- name: SW And ES install
run: bash ${INSTALL_SCRIPTS_DIR}/skywalking-deploy.sh
- name: Bookinfo demo install
run: bash ${INSTALL_SCRIPTS_DIR}/demo-deploy.sh
- uses: actions/upload-artifact@v1.0.0
with:
name: logs
Expand Down
4 changes: 3 additions & 1 deletion install/deploy/demo-deploy.sh
Expand Up @@ -17,6 +17,8 @@

set -e

#free -lh

# The script for bookinfo Application to deploy
BOOKINFO_VERSION="1.3"
kubectl label namespace default istio-injection=enabled
Expand All @@ -25,7 +27,7 @@ kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-${BOOKINF
# check status
kubectl get deploy | grep -E 'details|productpage|ratings|reviews' | awk '{print "deployment/"$1}' | while read deploy
do
kubectl rollout status ${deploy} --timeout 3m
kubectl wait ${deploy} --for condition=available --timeout=600s
done

# request
Expand Down
11 changes: 8 additions & 3 deletions install/deploy/istio-deploy.sh
Expand Up @@ -70,13 +70,18 @@ create_crd() {
deploy_istio() {
NAMESPACE=$1
VERSION=$2
helm pull istio/istio && tar zxvf istio-${VERSION}.tgz && rm istio-${VERSION}.tgz
helm install istio istio -n ${NAMESPACE}
CHART_DIR="istio-skywalking-ci/install/kubernetes/helm"

git clone -b istio-skywalking-ci https://github.com/SkyAPMTest/istio-skywalking-ci.git

cd $CHART_DIR

helm install istio istio -n ${NAMESPACE} -f istio/values-istio-skywalking.yaml

check() {
kubectl -n ${NAMESPACE} get deploy | grep istio | awk '{print "deployment/"$1}' | while read line ;
do
kubectl rollout status $line -n ${NAMESPACE} --timeout 3m
kubectl rollout status $line -n ${NAMESPACE} --timeout 10m
done
}
check
Expand Down
22 changes: 18 additions & 4 deletions install/deploy/skywalking-deploy.sh
Expand Up @@ -17,7 +17,7 @@

set -e

CHART_PATH="../kubernetes/helm"
CHART_PATH="./install/kubernetes/helm"
DPELOY_NAMESPACE="istio-system"
NEED_CHECK_PREFIX="deployment/skywalking-skywalking-"
ALS_ENABLED=true
Expand Down Expand Up @@ -47,10 +47,24 @@ and_stable_repo

helm dep up skywalking

helm -n $DPELOY_NAMESPACE install skywalking skywalking --set oap.istio.adapter.enabled=$MIXER_ENABLED --set oap.envoy.als.enabled=$ALS_ENABLED
sudo sysctl -w vm.max_map_count=262144
sudo sysctl -w vm.drop_caches=1
sudo sysctl -w vm.drop_caches=3

for component in $NEED_CHECK_PREFIX"oap" $NEED_CHECK_PREFIX"ui" ; do
kubectl -n istio-system rollout status $component --timeout 3m
TAG="ci"
IMAGE="skywalking/oap"

docker images

helm -n $DPELOY_NAMESPACE install skywalking skywalking --set oap.istio.adapter.enabled=$MIXER_ENABLED \
--set oap.envoy.als.enabled=$ALS_ENABLED --set oap.replicas=1 --set oap.image.tag=$TAG --set oap.image.repository=$IMAGE

for component in $NEED_CHECK_PREFIX"oap" ; do
sleep 60
kubectl get deploy -o wide -n $DPELOY_NAMESPACE
kubectl -n ${DPELOY_NAMESPACE} wait $component --for condition=available --timeout=600s
done

rm -rf tag.txt

echo "SkyWalking deployed successfully"
3 changes: 1 addition & 2 deletions install/kubernetes/helm/skywalking/Chart.yaml
Expand Up @@ -30,6 +30,5 @@ maintainers:

dependencies:
- name: elasticsearch
version: ~1.32.0
repository: https://kubernetes-charts.storage.googleapis.com/
version: 6.8.2
condition: elasticsearch.enabled
@@ -0,0 +1,37 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
42 changes: 42 additions & 0 deletions install/kubernetes/helm/skywalking/charts/elasticsearch/Chart.yaml
@@ -0,0 +1,42 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v2
name: elasticsearch
description: A ES Helm chart for SkyWalking CI pipeline

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 6.8.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 6.8.2

maintainers:
- name: hanahmily
email: hanahmily@gmail.com
- name: innerpeacez
email: innerpeace.zhai@gmail.com
@@ -0,0 +1,38 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}

1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "elasticsearch.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "elasticsearch.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "elasticsearch.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "elasticsearch.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
{{- end }}
@@ -0,0 +1,80 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}

{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "elasticsearch.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "elasticsearch.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "elasticsearch.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "elasticsearch.labels" -}}
helm.sh/chart: {{ include "elasticsearch.chart" . }}
{{ include "elasticsearch.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

{{/*
Selector labels
*/}}
{{- define "elasticsearch.selectorLabels" -}}
app.kubernetes.io/name: {{ include "elasticsearch.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "elasticsearch.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "elasticsearch.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
@@ -0,0 +1,71 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "elasticsearch.fullname" . }}
labels:
{{- include "elasticsearch.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "elasticsearch.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "elasticsearch.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "elasticsearch.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 9200
- name: transport
containerPort: 9300
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}