Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Shambugouda annigeri committed Aug 10, 2022
1 parent 75cefe9 commit 830c054
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ require (
github.com/fatih/color v1.10.0
github.com/go-logr/logr v0.4.0
github.com/google/go-cmp v0.5.5
github.com/google/uuid v1.1.2
github.com/hashicorp/go-retryablehttp v0.6.8
github.com/onsi/ginkgo/v2 v2.1.3
github.com/onsi/gomega v1.17.0
Expand Down Expand Up @@ -56,6 +55,7 @@ require (
github.com/google/btree v1.0.0 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
Expand Down
9 changes: 5 additions & 4 deletions sample-apps/fdb-profile-analyzer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ RUN microdnf --enablerepo=ubi* --disablerepo=rhel* install -y wget \

RUN groupadd -g 4059 foundationdb
RUN useradd -m -d / -s /bin/bash -u 4059 -o foundationdb -g 4059 -G 266

pip install foundationdb -i https://pypi.org/project/foundationdb


RUN pip install foundationdb
RUN pip install dateparser
RUN rpm -ivh https://github.com/apple/foundationdb/releases/download/7.1.19/foundationdb-clients-7.1.19-1.el7.x86_64.rpm
USER foundationdb
RUN curl -O https://raw.githubusercontent.com/apple/foundationdb/main/contrib/transaction_profiling_analyzer/transaction_profiling_analyzer.py
74 changes: 74 additions & 0 deletions sample-apps/fdb-profile-analyzer/sample_template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: batch/v1
kind: Job
metadata:
generation: 1
labels:
job-name: {{ .JobName }}
app: fdb-profile-analyzer
name: {{ .JobName }}
namespace: {{ .Namespace }}
spec:
backoffLimit: 6
completionMode: NonIndexed
completions: 1
parallelism: 1
suspend: false
template:
metadata:
creationTimestamp: null
labels:
job-name: {{ .JobName }}
app: fdb-profile-analyzer
spec:
containers:
- command:
- /bin/bash
args:
- -c
- python3.9 ./transaction_profiling_analyzer.py {{ .CommandArgs }}
env:
- name: FDB_CLUSTER_FILE
value: /var/dynamic-conf/fdb.cluster
- name: FDB_NETWORK_OPTION_TRACE_ENABLE
value: /var/log/fdb-profile-analyzer
- name: FDB_NETWORK_OPTION_TRACE_FORMAT
value: json
image: fdb-profile-analyzer:latest
imagePullPolicy: Always
name: profile-analyzer
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 100m
memory: 256Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/dynamic-conf
name: config-map
readOnly: true
- mountPath: /var/log/fdb-profile-analyzer
name: fdb-profile-analyzer-logs
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
securityContext:
fsGroup: 4059
runAsGroup: 4059
runAsUser: 4059
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
items:
- key: cluster-file
path: fdb.cluster
name: {{ .ClusterName }}-config
name: config-map
- emptyDir: {}
name: dynamic-conf
- emptyDir: {}
name: fdb-profile-analyzer-logs
ttlSecondsAfterFinished: 7200

0 comments on commit 830c054

Please sign in to comment.