diff --git a/.github/workflows/istio-mixer-ci.yaml b/.github/workflows/istio-mixer-ci.yaml index d5b0b75c571158d62dfff6466f0a36c4ef3a0bfc..d8931259678cefeedc85bebc1db4199a52993feb 100644 --- a/.github/workflows/istio-mixer-ci.yaml +++ b/.github/workflows/istio-mixer-ci.yaml @@ -18,8 +18,9 @@ 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 @@ -27,7 +28,7 @@ jobs: - 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 & @@ -35,6 +36,14 @@ jobs: 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 diff --git a/install/deploy/demo-deploy.sh b/install/deploy/demo-deploy.sh index de63ba70f978bd17c9f36a22daa3e9e7193e5e64..21eb3d29af45fc36ee83c0a77f7ede76a68697c6 100644 --- a/install/deploy/demo-deploy.sh +++ b/install/deploy/demo-deploy.sh @@ -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 @@ -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 diff --git a/install/deploy/istio-deploy.sh b/install/deploy/istio-deploy.sh index effc955fadae869e5f3ff7c8d507c79842520e7c..506f35ff8710615c9eeed204f2e3805ab681cf53 100644 --- a/install/deploy/istio-deploy.sh +++ b/install/deploy/istio-deploy.sh @@ -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 diff --git a/install/deploy/skywalking-deploy.sh b/install/deploy/skywalking-deploy.sh index 6c82ba4fbedccea476e379c193131ed0c799dd78..5ab2e1c01c4139285dd52f7762cca384ae847102 100644 --- a/install/deploy/skywalking-deploy.sh +++ b/install/deploy/skywalking-deploy.sh @@ -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 @@ -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" diff --git a/install/kubernetes/helm/skywalking/Chart.yaml b/install/kubernetes/helm/skywalking/Chart.yaml index b4aff3c54a08a6ce1f63e5051044f64517408bfd..1a46bccdce8f531f495d1b8e56ea8ac7424a2899 100644 --- a/install/kubernetes/helm/skywalking/Chart.yaml +++ b/install/kubernetes/helm/skywalking/Chart.yaml @@ -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 \ No newline at end of file diff --git a/install/kubernetes/helm/skywalking/charts/elasticsearch/.helmignore b/install/kubernetes/helm/skywalking/charts/elasticsearch/.helmignore new file mode 100644 index 0000000000000000000000000000000000000000..17b07a36541899e73c33bf3d0493d02653cb07b5 --- /dev/null +++ b/install/kubernetes/helm/skywalking/charts/elasticsearch/.helmignore @@ -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/ diff --git a/install/kubernetes/helm/skywalking/charts/elasticsearch/Chart.yaml b/install/kubernetes/helm/skywalking/charts/elasticsearch/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6ed6f9ca1206eebf548ae8f65172f2e6d856f5b3 --- /dev/null +++ b/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 \ No newline at end of file diff --git a/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/NOTES.txt b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/NOTES.txt new file mode 100644 index 0000000000000000000000000000000000000000..c58086e0c113d28b04f404ebbbe9e53df4e9a750 --- /dev/null +++ b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/NOTES.txt @@ -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 }} diff --git a/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/_helpers.tpl b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/_helpers.tpl new file mode 100644 index 0000000000000000000000000000000000000000..70ea209bc15d88672b4cd95b42437f6c85d133fa --- /dev/null +++ b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/_helpers.tpl @@ -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 -}} diff --git a/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/deployment.yaml b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1383786375c109625e8e77b8ca846a7abce45141 --- /dev/null +++ b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/deployment.yaml @@ -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 }} diff --git a/install/kubernetes/helm/skywalking/templates/ui-ingress.yaml b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/ingress.yaml similarity index 51% rename from install/kubernetes/helm/skywalking/templates/ui-ingress.yaml rename to install/kubernetes/helm/skywalking/charts/elasticsearch/templates/ingress.yaml index 899c86189060115904d0eaf3f0464847b2651dfe..7979ab61583100b501981a0d0a35ac491c305619 100644 --- a/install/kubernetes/helm/skywalking/templates/ui-ingress.yaml +++ b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/ingress.yaml @@ -13,37 +13,44 @@ # See the License for the specific language governing permissions and # limitations under the License. -{{- if .Values.ui.ingress.enabled -}} -{{- $serviceName := include "skywalking.ui.fullname" . -}} -{{- $servicePort := .Values.ui.service.externalPort -}} +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "elasticsearch.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} apiVersion: extensions/v1beta1 +{{- end }} kind: Ingress metadata: + name: {{ $fullName }} labels: - app: {{ template "skywalking.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.ui.name }}" - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - name: {{ template "skywalking.ui.fullname" . }} + {{- include "elasticsearch.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} annotations: - {{- range $key, $value := .Values.ui.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} rules: - {{- range .Values.ui.ingress.hosts }} - {{- $url := splitList "/" . }} - - host: {{ first $url }} + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} http: paths: - - path: /{{ rest $url | join "/" }} + {{- range .paths }} + - path: {{ . }} backend: - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} - {{- end -}} - {{- if .Values.ui.ingress.tls }} - tls: -{{ toYaml .Values.ui.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/service.yaml b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a7351bc35beca05c41a463973f05990bb361e2e3 --- /dev/null +++ b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/service.yaml @@ -0,0 +1,32 @@ +# 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: v1 +kind: Service +metadata: + name: {{ include "elasticsearch.fullname" . }} + labels: + {{- include "elasticsearch.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.ports.http }} + targetPort: http + name: http + - name: tcp + port: {{ .Values.service.ports.transport }} + targetPort: transport + selector: + {{- include "elasticsearch.selectorLabels" . | nindent 4 }} diff --git a/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/serviceaccount.yaml b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/serviceaccount.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d9a7adee2e1842ecf9963f7669438024046fca38 --- /dev/null +++ b/install/kubernetes/helm/skywalking/charts/elasticsearch/templates/serviceaccount.yaml @@ -0,0 +1,23 @@ +# 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. + +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "elasticsearch.serviceAccountName" . }} + labels: +{{ include "elasticsearch.labels" . | nindent 4 }} +{{- end }} diff --git a/install/kubernetes/helm/skywalking/charts/elasticsearch/values.yaml b/install/kubernetes/helm/skywalking/charts/elasticsearch/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0c8c62e141efc11ae78805f2966397f25b2c971f --- /dev/null +++ b/install/kubernetes/helm/skywalking/charts/elasticsearch/values.yaml @@ -0,0 +1,83 @@ +# 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. + +# Default values for elasticsearch. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: elasticsearch + pullPolicy: IfNotPresent + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + ports: + transport: 9300 + http: 9200 + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/install/kubernetes/helm/skywalking/templates/_helpers.tpl b/install/kubernetes/helm/skywalking/templates/_helpers.tpl index 0194935347a5ed1510fb3437edac12d9c41fd976..387e188bf56a8f01cfe0523e2048b95e1d19b7fc 100644 --- a/install/kubernetes/helm/skywalking/templates/_helpers.tpl +++ b/install/kubernetes/helm/skywalking/templates/_helpers.tpl @@ -74,5 +74,5 @@ Create the name of the service account to use for the oap cluster - name: wait-for-elasticsearch image: busybox:1.30 imagePullPolicy: IfNotPresent - command: ['sh', '-c', 'for i in $(seq 1 60); do nc -z -w3 {{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }} 9200 && exit 0 || sleep 5; done; exit 1'] + command: ['sh', '-c', 'for i in $(seq 1 60); do nc -z -w3 {{ include "call-nested" (list . "elasticsearch" "elasticsearch.fullname") }} 9200 && exit 0 || sleep 5; done; exit 1'] {{- end -}} diff --git a/install/kubernetes/helm/skywalking/templates/es-init.job.yaml b/install/kubernetes/helm/skywalking/templates/es-init.job.yaml index 8124ec17e1c1779f99aaa29e79a4e8686ae6a693..ae143c005a2737c8724687168e07c6d48cb2621d 100644 --- a/install/kubernetes/helm/skywalking/templates/es-init.job.yaml +++ b/install/kubernetes/helm/skywalking/templates/es-init.job.yaml @@ -50,4 +50,4 @@ spec: - name: SW_STORAGE value: elasticsearch - name: SW_STORAGE_ES_CLUSTER_NODES - value: "{{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }}:9200" + value: "{{ include "call-nested" (list . "elasticsearch" "elasticsearch.fullname") }}:9200" diff --git a/install/kubernetes/helm/skywalking/templates/oap-deployment.yaml b/install/kubernetes/helm/skywalking/templates/oap-deployment.yaml index 6d6cc8a2007c57282c4cc02230f9ab2eca6251b6..696e3c9a1f29d9dd6d97123b583d40b6e8e772b8 100644 --- a/install/kubernetes/helm/skywalking/templates/oap-deployment.yaml +++ b/install/kubernetes/helm/skywalking/templates/oap-deployment.yaml @@ -80,7 +80,7 @@ spec: {{- include "skywalking.containers.wait-for-es" . | nindent 6 }} containers: - name: {{ .Values.oap.name }} - image: "{{ .Values.oap.image.repository }}:{{ .Chart.AppVersion }}" + image: "{{ .Values.oap.image.repository }}:{{ .Values.oap.image.tag }}" imagePullPolicy: {{ .Values.oap.image.pullPolicy }} ports: - containerPort: 11800 @@ -111,7 +111,7 @@ spec: value: {{ .Values.oap.envoy.als.enabled | quote}} {{- end }} - name: SW_STORAGE_ES_CLUSTER_NODES - value: "{{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }}:9200" + value: "{{ include "call-nested" (list . "elasticsearch" "elasticsearch.fullname") }}:9200" {{- range $key, $value := .Values.oap.env }} - name: {{ $key }} value: {{ $value | quote }} diff --git a/install/kubernetes/helm/skywalking/templates/ui-deployment.yaml b/install/kubernetes/helm/skywalking/templates/ui-deployment.yaml deleted file mode 100644 index e8428f7d913be0c1c12411749731872d9707014b..0000000000000000000000000000000000000000 --- a/install/kubernetes/helm/skywalking/templates/ui-deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# 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: {{ template "skywalking.ui.fullname" . }} - labels: - app: {{ template "skywalking.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.ui.name }}" - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - replicas: {{ .Values.ui.replicas }} - selector: - matchLabels: - app: {{ template "skywalking.name" . }} - component: "{{ .Values.ui.name }}" - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "skywalking.name" . }} - component: "{{ .Values.ui.name }}" - release: {{ .Release.Name }} - {{- if .Values.ui.podAnnotations }} - annotations: -{{ toYaml .Values.ui.podAnnotations | indent 8 }} - {{- end }} - spec: - containers: - - name: {{ .Values.ui.name }} - image: "{{ .Values.ui.image.repository }}:{{ .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.ui.image.pullPolicy }} - ports: - - containerPort: {{ .Values.ui.service.internalPort }} - name: page -{{- if .Values.ui.resources }} - resources: -{{ toYaml .Values.ui.resources | indent 10 }} -{{- end }} - env: - - name: SW_OAP_ADDRESS - value: {{ template "skywalking.oap.fullname" . }}:{{ .Values.oap.ports.rest }} diff --git a/install/kubernetes/helm/skywalking/templates/ui-svc.yaml b/install/kubernetes/helm/skywalking/templates/ui-svc.yaml deleted file mode 100644 index 6250c83bb32d1f7da15925e49ba352e3772056c8..0000000000000000000000000000000000000000 --- a/install/kubernetes/helm/skywalking/templates/ui-svc.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# 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: v1 -kind: Service -metadata: - labels: - app: {{ template "skywalking.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.ui.name }}" - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - name: {{ template "skywalking.ui.fullname" . }} - {{- with .Values.ui.service.annotations }} - annotations: - {{- range $key, $value := . }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} -spec: - {{- if .Values.ui.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.ui.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} - {{- end }} - type: {{ .Values.ui.service.type }} - {{- if and (eq .Values.ui.service.type "ClusterIP") .Values.ui.service.clusterIP }} - clusterIP: {{ .Values.ui.service.clusterIP }} - {{- end }} - ports: - - port: {{ .Values.ui.service.externalPort }} - targetPort: {{ .Values.ui.service.internalPort }} - protocol: TCP -{{ if (and (eq .Values.ui.service.type "NodePort") (not (empty .Values.ui.service.nodePort))) }} - nodePort: {{ .Values.ui.service.nodePort }} -{{ end }} -{{- if .Values.ui.service.portName }} - name: {{ .Values.ui.service.portName }} -{{- end }} -{{- if .Values.ui.service.externalIPs }} - externalIPs: -{{ toYaml .Values.ui.service.externalIPs | indent 4 }} -{{- end }} - selector: - app: {{ template "skywalking.name" . }} - component: "{{ .Values.ui.name }}" - release: {{ .Release.Name }} -{{- if .Values.ui.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.ui.service.loadBalancerIP }} -{{- end }} diff --git a/skywalking-ui b/skywalking-ui index 77d6532d0e1bb1dcaadbcc739cc9f60ea7e870fe..e6a036fb9e54f2f06a59f1a2cfc79eb3b432cc89 160000 --- a/skywalking-ui +++ b/skywalking-ui @@ -1 +1 @@ -Subproject commit 77d6532d0e1bb1dcaadbcc739cc9f60ea7e870fe +Subproject commit e6a036fb9e54f2f06a59f1a2cfc79eb3b432cc89 diff --git a/test/scripts/clean.sh b/test/e2e-mesh/e2e-istio/scripts/clean.sh similarity index 100% rename from test/scripts/clean.sh rename to test/e2e-mesh/e2e-istio/scripts/clean.sh diff --git a/test/e2e-mesh/e2e-istio/scripts/compile_build.sh b/test/e2e-mesh/e2e-istio/scripts/compile_build.sh new file mode 100755 index 0000000000000000000000000000000000000000..26a964e52cc2913ab329922df9c4941823220726 --- /dev/null +++ b/test/e2e-mesh/e2e-istio/scripts/compile_build.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# ---------------------------------------------------------------------------- +# 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. +# ---------------------------------------------------------------------------- + +set -e + +TAG="ci" + +git rev-parse HEAD +git submodule init +git submodule update + +make build.all && make docker.oap -e TAG=$TAG diff --git a/test/scripts/minikube.sh b/test/e2e-mesh/e2e-istio/scripts/minikube.sh similarity index 100% rename from test/scripts/minikube.sh rename to test/e2e-mesh/e2e-istio/scripts/minikube.sh diff --git a/test/scripts/pre.sh b/test/e2e-mesh/e2e-istio/scripts/pre.sh similarity index 96% rename from test/scripts/pre.sh rename to test/e2e-mesh/e2e-istio/scripts/pre.sh index d2cdbfe79e61ce9dbef25eba866fbf792ce60228..c2b8eaaa3ce16617285f1b1c99bb7a75ca611149 100755 --- a/test/scripts/pre.sh +++ b/test/e2e-mesh/e2e-istio/scripts/pre.sh @@ -23,7 +23,7 @@ set -ex HELMVERSION=$1 if [[ "${HELMVERSION}" == "" ]]; then - HELMVERSION="helm-v3.0.0-rc.3" + HELMVERSION="helm-v3.0.0" fi MINIKUBEVERESION=$2 @@ -70,7 +70,8 @@ sudo apt-get install -y \ ca-certificates \ curl \ gnupg-agent \ - software-properties-common + software-properties-common \ + openjdk-8-jdk-headless curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo apt-key fingerprint 0EBFCD88 sudo add-apt-repository \