Skip to content

Commit 5b3973c

Browse files
Add quickstart mode (rancher#50)
* Add quickstart mode * Fix drone * fix drone * fix preprocessing * fix delete and comments * fix wait for ns * fix images * Use upstream images * Update images
1 parent c373eac commit 5b3973c

File tree

90 files changed

+626
-4520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+626
-4520
lines changed

Diff for: .drone.yml

+7-202
Original file line numberDiff line numberDiff line change
@@ -1,238 +1,43 @@
11
---
22
kind: pipeline
3-
name: amd64
3+
type: docker
4+
name: build-amd64
45

56
platform:
67
os: linux
78
arch: amd64
89

910
steps:
10-
- name: build
11-
image: rancher/dapper:v0.4.1
11+
- name: build-and-package
12+
image: rancher/dapper:v0.5.5
1213
commands:
1314
- dapper ci
1415
volumes:
1516
- name: docker
1617
path: /var/run/docker.sock
1718

18-
- name: github_binary_release
19+
- name: publish-bin-artifacts
1920
image: plugins/github-release
2021
settings:
2122
api_key:
2223
from_secret: github_token
23-
prerelease: true
2424
checksum:
2525
- sha256
2626
checksum_file: CHECKSUMsum-amd64.txt
2727
checksum_flatten: true
2828
files:
29-
- "dist/artifacts/*"
30-
when:
31-
instance:
32-
- drone-publish.rancher.io
33-
ref:
34-
- refs/head/master
35-
- refs/tags/*
36-
event:
37-
- tag
38-
39-
- name: docker-publish
40-
image: plugins/docker
41-
settings:
42-
dockerfile: package/Dockerfile
43-
password:
44-
from_secret: docker_password
45-
repo: "rancher/opnictl"
46-
tag: "${DRONE_TAG}-amd64"
47-
username:
48-
from_secret: docker_username
49-
when:
50-
instance:
51-
- drone-publish.rancher.io
52-
ref:
53-
- refs/head/master
54-
- refs/tags/*
55-
event:
56-
- tag
57-
58-
volumes:
59-
- name: docker
60-
host:
61-
path: /var/run/docker.sock
62-
63-
---
64-
kind: pipeline
65-
name: arm64
66-
67-
platform:
68-
os: linux
69-
arch: arm64
70-
71-
steps:
72-
- name: build
73-
image: rancher/dapper:v0.4.1
74-
commands:
75-
- dapper ci
76-
volumes:
77-
- name: docker
78-
path: /var/run/docker.sock
79-
80-
- name: github_binary_release
81-
image: plugins/github-release
82-
settings:
83-
api_key:
84-
from_secret: github_token
29+
- bin/*
8530
prerelease: true
86-
checksum:
87-
- sha256
88-
checksum_file: CHECKSUMsum-arm64.txt
89-
checksum_flatten: true
90-
files:
91-
- "dist/artifacts/*"
9231
when:
93-
instance:
94-
- drone-publish.rancher.io
95-
ref:
96-
- refs/head/master
97-
- refs/tags/*
9832
event:
9933
- tag
100-
101-
- name: docker-publish
102-
image: plugins/docker
103-
settings:
104-
dockerfile: package/Dockerfile
105-
password:
106-
from_secret: docker_password
107-
repo: "rancher/opnictl"
108-
tag: "${DRONE_TAG}-arm64"
109-
username:
110-
from_secret: docker_username
111-
when:
11234
instance:
11335
- drone-publish.rancher.io
11436
ref:
11537
- refs/head/master
11638
- refs/tags/*
117-
event:
118-
- tag
11939

12040
volumes:
12141
- name: docker
12242
host:
123-
path: /var/run/docker.sock
124-
125-
---
126-
kind: pipeline
127-
name: arm
128-
129-
platform:
130-
os: linux
131-
arch: arm
132-
133-
steps:
134-
- name: build
135-
image: rancher/dapper:v0.4.1
136-
commands:
137-
- dapper ci
138-
volumes:
139-
- name: docker
140-
path: /var/run/docker.sock
141-
142-
- name: github_binary_release
143-
image: plugins/github-release
144-
settings:
145-
api_key:
146-
from_secret: github_token
147-
prerelease: true
148-
checksum:
149-
- sha256
150-
checksum_file: CHECKSUMsum-arm.txt
151-
checksum_flatten: true
152-
files:
153-
- "dist/artifacts/*"
154-
when:
155-
instance:
156-
- drone-publish.rancher.io
157-
ref:
158-
- refs/head/master
159-
- refs/tags/*
160-
event:
161-
- tag
162-
163-
- name: docker-publish
164-
image: plugins/docker
165-
settings:
166-
dockerfile: package/Dockerfile
167-
password:
168-
from_secret: docker_password
169-
repo: "rancher/opnictl"
170-
tag: "${DRONE_TAG}-arm"
171-
username:
172-
from_secret: docker_username
173-
when:
174-
instance:
175-
- drone-publish.rancher.io
176-
ref:
177-
- refs/head/master
178-
- refs/tags/*
179-
event:
180-
- tag
181-
182-
volumes:
183-
- name: docker
184-
host:
185-
path: /var/run/docker.sock
186-
187-
---
188-
kind: pipeline
189-
name: manifest
190-
191-
platform:
192-
os: linux
193-
arch: amd64
194-
195-
steps:
196-
- name: manifest
197-
image: plugins/manifest:1.0.2
198-
settings:
199-
username:
200-
from_secret: docker_username
201-
password:
202-
from_secret: docker_password
203-
platforms:d64
204-
- linux/arm64
205-
- linux/arm
206-
target: "rancher/opnictl:${DRONE_TAG}"
207-
template: "rancher/opnictl:${DRONE_TAG}-ARCH"
208-
when:
209-
instance:
210-
- drone-publish.rancher.io
211-
ref:
212-
- refs/head/master
213-
- refs/tags/*
214-
event:
215-
- tag
216-
217-
depends_on:
218-
- amd64
219-
- arm64
220-
- arm
221-
- linux/amd64
222-
- linux/arm64
223-
- linux/arm
224-
target: "rancher/opnictl:${DRONE_TAG}"
225-
template: "rancher/opnictl:${DRONE_TAG}-ARCH"
226-
when:
227-
instance:
228-
- drone-publish.rancher.io
229-
ref:
230-
- refs/head/master
231-
- refs/tags/*
232-
event:
233-
- tag
234-
235-
depends_on:
236-
- amd64
237-
- arm64
238-
- arm
43+
path: /var/run/docker.sock

Diff for: go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ replace (
3838
require (
3939
github.com/go-bindata/go-bindata v3.1.2+incompatible
4040
github.com/k3s-io/helm-controller v0.8.4
41+
github.com/mitchellh/go-homedir v1.1.0
4142
github.com/rancher/wrangler v0.8.0
4243
github.com/rancher/wrangler-api v0.6.0
4344
github.com/sirupsen/logrus v1.6.0

Diff for: go.sum

+1
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff
264264
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
265265
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
266266
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
267+
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
267268
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
268269
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
269270
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: src/k8s/opni-stack/opendistro-es.yaml renamed to manifests/opni-stack/opendistro-es.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ spec:
1111
elasticsearch.data.persistence.enabled: "true"
1212
elasticsearch.data.persistence.storageClass: "local-path"
1313
elasticsearch.username: "%ES_USER%"
14-
elasticsearch.password: "%ES_PASSWORD%"
14+
elasticsearch.password: "%ES_PASSWORD%"
15+

Diff for: manifests/opni-stack/rancher-logging.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: helm.cattle.io/v1
2+
kind: HelmChart
3+
metadata:
4+
name: rancher-logging-crd
5+
namespace: opni-system
6+
spec:
7+
chart: rancher-logging-crd
8+
repo: http://charts.rancher.io/
9+
version: "3.9.400"
10+
---
11+
apiVersion: helm.cattle.io/v1
12+
kind: HelmChart
13+
metadata:
14+
name: rancher-logging
15+
namespace: opni-system
16+
spec:
17+
chart: rancher-logging
18+
repo: http://charts.rancher.io/
19+
version: "3.9.400"
20+
set:
21+
additionalLoggingSources.rke.enabled: "true"

Diff for: src/k8s/opni-stack/traefik.yaml renamed to manifests/opni-stack/traefik.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ metadata:
66
spec:
77
chart: traefik
88
repo: https://helm.traefik.io/traefik
9-
version: "%TRAEFIK_VERSION%"
9+
version: "%TRAEFIK_VERSION%"
10+
set:
11+
ports.websecure.nodePort: 32222 # hardcoding node port for traefik endpoint to be used later in rancher logging

Diff for: src/k8s/services/drain-service.yaml renamed to manifests/services/drain-service.yaml

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: drain-service
5+
namespace: opni-system
56
spec:
67
replicas: 1
78
selector:
@@ -14,7 +15,7 @@ spec:
1415
spec:
1516
containers:
1617
- name: drain-service
17-
image: amartyarancher/drain-service:v0.1
18+
image: rancher/opni-drain-service:v0.1.1
1819
imagePullPolicy: Always
1920
env:
2021
- name: NATS_SERVER_URL
@@ -29,4 +30,13 @@ spec:
2930
value: "https://opendistro-es-client-service.opni-system.svc.cluster.local:9200"
3031
- name: FAIL_KEYWORDS
3132
value: "fail,error,missing,unable"
32-
33+
- name: MINIO_SERVER_URL
34+
value: "http://minio.opni-system.svc.cluster.local:9000"
35+
- name: MINIO_ACCESS_KEY
36+
value: "%MINIO_ACCESS_KEY%"
37+
- name: MINIO_SECRET_KEY
38+
value: "%MINIO_SECRET_KEY%"
39+
- name: ES_USERNAME
40+
value: "%ES_USER%"
41+
- name: ES_PASSWORD
42+
value: "%ES_PASSWORD%"

Diff for: manifests/services/log-output.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
apiVersion: logging.banzaicloud.io/v1beta1
2+
kind: ClusterOutput
3+
metadata:
4+
name: "aiops-demo-log-output"
5+
namespace: "opni-system"
6+
spec:
7+
http:
8+
endpoint: http://payload-receiver-service.opni-system.svc/
9+
content_type: application/json
10+
json_array: true
11+
buffer:
12+
tags: "[]"
13+
flush_interval: 2s
14+
chunk_limit_size: 1mb
15+
---
16+
apiVersion: logging.banzaicloud.io/v1beta1
17+
kind: ClusterFlow
18+
metadata:
19+
name: "aiops-demo-log-flow"
20+
namespace: "opni-system"
21+
spec:
22+
filters:
23+
- dedot:
24+
de_dot_separator: "-"
25+
de_dot_nested: true
26+
- grep:
27+
exclude:
28+
- key: log
29+
pattern: ^\n$
30+
-
31+
detectExceptions:
32+
languages:
33+
- java
34+
- python
35+
- go
36+
- ruby
37+
- js
38+
- csharp
39+
- php
40+
multiline_flush_interval: "0.1"
41+
globalOutputRefs:
42+
- "aiops-demo-log-output"

0 commit comments

Comments
 (0)