Skip to content

Commit

Permalink
updated image
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhatsharma committed Apr 30, 2022
1 parent 60bbdeb commit 6e77d28
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 19 deletions.
28 changes: 14 additions & 14 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ changelog:
- "^test:"
dockers:
- image_templates:
- public.ecr.aws/h9e2j3o7/zinc:{{ .Version }}-amd64
- public.ecr.aws/zinclabs/zinc:{{ .Version }}-amd64
use: buildx
skip_push: "false"
build_flag_templates:
Expand All @@ -66,7 +66,7 @@ dockers:
- web
- embed.go
- image_templates:
- public.ecr.aws/h9e2j3o7/zinc:{{ .Version }}-arm64
- public.ecr.aws/zinclabs/zinc:{{ .Version }}-arm64
use: buildx
skip_push: "false"
build_flag_templates:
Expand All @@ -82,7 +82,7 @@ dockers:
- web
- embed.go
- image_templates:
- public.ecr.aws/h9e2j3o7/zinc:{{ .Version }}-armv7
- public.ecr.aws/zinclabs/zinc:{{ .Version }}-armv7
use: buildx
skip_push: "false"
build_flag_templates:
Expand All @@ -98,7 +98,7 @@ dockers:
- web
- embed.go
- image_templates:
- public.ecr.aws/h9e2j3o7/zinc:latest-amd64
- public.ecr.aws/zinclabs/zinc:latest-amd64
use: buildx
skip_push: "false"
build_flag_templates:
Expand All @@ -114,7 +114,7 @@ dockers:
- web
- embed.go
- image_templates:
- public.ecr.aws/h9e2j3o7/zinc:latest-arm64
- public.ecr.aws/zinclabs/zinc:latest-arm64
use: buildx
skip_push: "false"
build_flag_templates:
Expand All @@ -130,7 +130,7 @@ dockers:
- web
- embed.go
- image_templates:
- public.ecr.aws/h9e2j3o7/zinc:latest-armv7
- public.ecr.aws/zinclabs/zinc:latest-armv7
use: buildx
skip_push: "false"
build_flag_templates:
Expand All @@ -150,26 +150,26 @@ docker_manifests:

# Name template for the manifest.
# Defaults to empty.
name_template: public.ecr.aws/h9e2j3o7/zinc:{{ .Version }}
name_template: public.ecr.aws/zinclabs/zinc:{{ .Version }}

# Image name templates to be added to this manifest.
# Defaults to empty.
image_templates:
- public.ecr.aws/h9e2j3o7/zinc:{{ .Version }}-amd64
- public.ecr.aws/h9e2j3o7/zinc:{{ .Version }}-arm64
- public.ecr.aws/h9e2j3o7/zinc:{{ .Version }}-armv7
- public.ecr.aws/zinclabs/zinc:{{ .Version }}-amd64
- public.ecr.aws/zinclabs/zinc:{{ .Version }}-arm64
- public.ecr.aws/zinclabs/zinc:{{ .Version }}-armv7
- id: zinc-latest

# Name template for the manifest.
# Defaults to empty.
name_template: public.ecr.aws/h9e2j3o7/zinc:latest
name_template: public.ecr.aws/zinclabs/zinc:latest

# Image name templates to be added to this manifest.
# Defaults to empty.
image_templates:
- public.ecr.aws/h9e2j3o7/zinc:latest-amd64
- public.ecr.aws/h9e2j3o7/zinc:latest-arm64
- public.ecr.aws/h9e2j3o7/zinc:latest-armv7
- public.ecr.aws/zinclabs/zinc:latest-amd64
- public.ecr.aws/zinclabs/zinc:latest-arm64
- public.ecr.aws/zinclabs/zinc:latest-armv7
# https://goreleaser.com/customization/homebrew/
brews:
- name: zinc
Expand Down
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ phases:
commands:

- echo Logging in to Amazon ECR...
- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/h9e2j3o7
- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/zinclabs
# Install AWS CLI
# - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
# - unzip awscliv2.zip
Expand Down
116 changes: 116 additions & 0 deletions k8s/ingest-fluent-bit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: fluent-bit-config
namespace: logging
labels:
k8s-app: fluent-bit
data:
# Configuration files: server, input, filters and output
# ======================================================
fluent-bit.conf: |
[SERVICE]
Flush 1
Log_Level info
Daemon off
Parsers_File parsers.conf
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port 2020
@INCLUDE input-kubernetes.conf
@INCLUDE filter-kubernetes.conf
@INCLUDE output-elasticsearch.conf
input-kubernetes.conf: |
[INPUT]
Name tail
Tag kube.*
Path /var/log/containers/*.log
Parser docker
DB /var/log/flb_kube.db
Mem_Buf_Limit 5MB
Skip_Long_Lines On
Refresh_Interval 10
filter-kubernetes.conf: |
[FILTER]
Name kubernetes
Match kube.*
Kube_URL https://kubernetes.default.svc:443
Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token
Kube_Tag_Prefix kube.var.log.containers.
Merge_Log On
Merge_Log_Key log_processed
K8S-Logging.Parser On
K8S-Logging.Exclude Off
output-elasticsearch.conf: |
[OUTPUT]
Name es
Match *
Path /es
Host z.zinc.svc.cluster.local
Port 4080
Generate_ID On
HTTP_User admin
HTTP_Passwd Complexpass#123
Logstash_Format On
Logstash_Prefix k8s-logs
Logstash_DateFormat %Y.%m.%d
parsers.conf: |
[PARSER]
Name apache
Format regex
Regex ^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$
Time_Key time
Time_Format %d/%b/%Y:%H:%M:%S %z
[PARSER]
Name apache2
Format regex
Regex ^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$
Time_Key time
Time_Format %d/%b/%Y:%H:%M:%S %z
[PARSER]
Name apache_error
Format regex
Regex ^\[[^ ]* (?<time>[^\]]*)\] \[(?<level>[^\]]*)\](?: \[pid (?<pid>[^\]]*)\])?( \[client (?<client>[^\]]*)\])? (?<message>.*)$
[PARSER]
Name nginx
Format regex
Regex ^(?<remote>[^ ]*) (?<host>[^ ]*) (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$
Time_Key time
Time_Format %d/%b/%Y:%H:%M:%S %z
[PARSER]
Name json
Format json
Time_Key time
Time_Format %d/%b/%Y:%H:%M:%S %z
[PARSER]
Name docker
Format json
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Time_Keep On
[PARSER]
# http://rubular.com/r/tjUt3Awgg4
Name cri
Format regex
Regex ^(?<time>[^ ]+) (?<stream>stdout|stderr) (?<logtag>[^ ]*) (?<message>.*)$
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L%z
[PARSER]
Name syslog
Format regex
Regex ^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<host>[^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$
Time_Key time
Time_Format %b %d %H:%M:%S
2 changes: 1 addition & 1 deletion k8s/kube-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
# terminationGracePeriodSeconds: 0
containers:
- name: zinc
image: public.ecr.aws/h9e2j3o7/zinc:latest
image: public.ecr.aws/zinclabs/zinc:latest
env:
- name: ZINC_FIRST_ADMIN_USER
value: admin
Expand Down
6 changes: 3 additions & 3 deletions multiarch.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#/bin/sh

aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/h9e2j3o7
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/zinclabs

# docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag public.ecr.aws/h9e2j3o7/zinc:v0.1.3-s3test .
# docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag public.ecr.aws/zinclabs/zinc:v0.1.3-s3test .

docker buildx build --push --platform linux/amd64 --tag public.ecr.aws/h9e2j3o7/zinc:v0.1.3-s3test .
docker buildx build --push --platform linux/amd64 --tag public.ecr.aws/zinclabs/zinc:v0.1.3-s3test .


0 comments on commit 6e77d28

Please sign in to comment.