Skip to content

Commit

Permalink
enterprise cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocicerchia committed Nov 20, 2023
1 parent 68d1336 commit 33d3629
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
-v ${{ github.workspace }}/collector:/etc/otel
# TODO: NEED TO FIND A WAY TO MAKE IT WORKING WITH VOLUMES
nginx:
image: fabiocicerchia/go-proxy-cache-test:nginx-ee
image: fabiocicerchia/go-proxy-cache-test:nginx
ports:
- "40080:40080" # http
- "40081:40081" # ws
Expand Down
41 changes: 13 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,29 +163,16 @@ release: ## release
##@ DOCKER
################################################################################

docker-push: ## build and push a docker image
docker buildx build --push -t fabiocicerchia/go-proxy-cache:latest -t fabiocicerchia/go-proxy-cache:$$VER -f docker/Dockerfile .

docker-push-ee: ## build and push a docker EE image
docker buildx build --push -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:latest -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:$$VER -f docker/Dockerfile .

docker-push-all: docker-push ## build and push multiple docker images for multiarch
docker buildx build --push --platform=amd64,arm64 -t fabiocicerchia/go-proxy-cache:alpine -f docker/Dockerfile.alpine .
docker buildx build --push --platform=amd64,arm64 -t fabiocicerchia/go-proxy-cache:amazonlinux -f docker/Dockerfile.amazonlinux .
docker buildx build --push --platform=amd64,arm64 -t fabiocicerchia/go-proxy-cache:debian -f docker/Dockerfile.debian .
docker buildx build --push --platform=amd64,arm64 -t fabiocicerchia/go-proxy-cache:fedora -f docker/Dockerfile.fedora .
docker buildx build --push --platform=amd64,arm64 -t fabiocicerchia/go-proxy-cache:ubuntu -f docker/Dockerfile.ubuntu .

docker-push-all-ee: ## build and push multiple docker EE images for multiarch
PLATFORM=amd64 make docker-push-arch-ee
PLATFORM=arm64 make docker-push-arch-ee

docker-push-arch-ee: docker-push-ee ## build and push multiple docker EE images for one platform
docker buildx build --push --platform=$$PLATFORM -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:$$VER-alpine-$$PLATFORM -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:alpine-$$PLATFORM -f docker/Dockerfile.alpine .
docker buildx build --push --platform=$$PLATFORM -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:$$VER-amazonlinux-$$PLATFORM -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:amazonlinux-$$PLATFORM -f docker/Dockerfile.amazonlinux .
docker buildx build --push --platform=$$PLATFORM -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:$$VER-debian-$$PLATFORM -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:debian-$$PLATFORM -f docker/Dockerfile.debian .
docker buildx build --push --platform=$$PLATFORM -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:$$VER-fedora-$$PLATFORM -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:fedora-$$PLATFORM -f docker/Dockerfile.fedora .
docker buildx build --push --platform=$$PLATFORM -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:$$VER-ubuntu-$$PLATFORM -t fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:ubuntu-$$PLATFORM -f docker/Dockerfile.ubuntu .
docker-push-all: ## build and push multiple docker images for multiarch
PLATFORM=amd64 make docker-push-arch
PLATFORM=arm64 make docker-push-arch

docker-push-arch: docker-push ## build and push multiple docker images for one platform
docker buildx build --push --platform=$$PLATFORM -t fabiocicerchia/go-proxy-cache:$$VER-alpine-$$PLATFORM -t fabiocicerchia/go-proxy-cache:alpine-$$PLATFORM -f docker/Dockerfile.alpine .
docker buildx build --push --platform=$$PLATFORM -t fabiocicerchia/go-proxy-cache:$$VER-amazonlinux-$$PLATFORM -t fabiocicerchia/go-proxy-cache:amazonlinux-$$PLATFORM -f docker/Dockerfile.amazonlinux .
docker buildx build --push --platform=$$PLATFORM -t fabiocicerchia/go-proxy-cache:$$VER-debian-$$PLATFORM -t fabiocicerchia/go-proxy-cache:debian-$$PLATFORM -f docker/Dockerfile.debian .
docker buildx build --push --platform=$$PLATFORM -t fabiocicerchia/go-proxy-cache:$$VER-fedora-$$PLATFORM -t fabiocicerchia/go-proxy-cache:fedora-$$PLATFORM -f docker/Dockerfile.fedora .
docker buildx build --push --platform=$$PLATFORM -t fabiocicerchia/go-proxy-cache:$$VER-ubuntu-$$PLATFORM -t fabiocicerchia/go-proxy-cache:ubuntu-$$PLATFORM -f docker/Dockerfile.ubuntu .

################################################################################
##@ HELM
Expand All @@ -197,8 +184,6 @@ helm-create-package: ## create an helm package from current chart
helm-update-repo: ## update index chart repo
helm repo index kubernetes/helm/

helm-deploy-chart: ## deploy to jfrog artifactory a new helm chart's package
export DEPLOY_FILEPATH=kubernetes/helm/charts/$$DEPLOY_FILE \
curl -H 'X-Checksum-Deploy: true' -H "X-Checksum-Sha256: $(shell sha256sum $$DEPLOY_FILEPATH | awk '{print $$1}')" \
-H "X-JFrog-Art-Api: $$JFROG_APIKEY" -T $$DEPLOY_FILEPATH \
"https://fabiocicerchia.jfrog.io/artifactory/go-proxy-cache-ee-helm/$$DEPLOY_FILE"
helm-deploy-chart: ## deploy to a new helm chart's package
export DEPLOY_FILEPATH=kubernetes/helm/charts/$$DEPLOY_FILE
echo "Manually push the file $$DEPLOY_FILEPATH to GitHub"
24 changes: 2 additions & 22 deletions docs/DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,6 @@ $ lsof -p PID | wc -l

## Helm

### JFrog Artifactory

```console
export USERNAME=
export PASSWORD=
export JFROG_APIKEY=

# CONFIGURE DOCKER
echo -n "$JFROG_APIKEY" | docker login fabiocicerchia.jfrog.io --username $USERNAME --password-stdin

# DEPLOY DOCKER
docker tag <IMAGE_ID> fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/<DOCKER_IMAGE>:<DOCKER_TAG>

# CONFIGURE HELM
helm repo add go-proxy-cache-ee-helm https://fabiocicerchia.jfrog.io/artifactory/api/helm/go-proxy-cache-ee-helm --username $USERNAME --password $PASSWORD

# DEPLOY HELM
DEPLOY_FILE=<PATH_TO_FILE> make helm-deploy-chart
```

### Test chart locally

```console
Expand All @@ -94,8 +74,8 @@ helm install --dry-run --debug --create-namespace -n gpc-test gpc-test ./kuberne

```console
helm repo update
helm repo add go-proxy-cache-ee-helm https://fabiocicerchia.jfrog.io/artifactory/api/helm/go-proxy-cache-ee-helm --username $USERNAME --password $PASSWORD
helm install --dry-run --debug --create-namespace -n gpc-test gpc-test go-proxy-cache-ee-helm/go-proxy-cache-ee
helm repo add go-proxy-cache-helm https://fabiocicerchia.jfrog.io/artifactory/api/helm/go-proxy-cache-ee-helm --username $USERNAME --password $PASSWORD
helm install --dry-run --debug --create-namespace -n gpc-test gpc-test go-proxy-cache-helm/go-proxy-cache
```

### Uninstall
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: go-proxy-cache-ee
name: go-proxy-cache
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/helm/index.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: v1
entries:
go-proxy-cache-ee:
go-proxy-cache:
- apiVersion: v2
appVersion: 1.3.0
created: "2022-04-07T08:43:22.33892609+02:00"
description: A Helm chart for Kubernetes
digest: a1d76006b873bab027f944ba708c9d05bce1007efff0681994d4dc55845ec89f
name: go-proxy-cache-ee
name: go-proxy-cache
type: application
urls:
- charts/go-proxy-cache-ee-0.1.0.tgz
- charts/go-proxy-cache-0.1.0.tgz
version: 0.1.0
generated: "2022-04-07T08:43:22.336548646+02:00"
2 changes: 1 addition & 1 deletion kubernetes/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ spec:
{{- toYaml .Values.goproxycache.podSecurityContext | nindent 8 }}
containers:
- name: go-proxy-cache
image: fabiocicerchia.jfrog.io/go-proxy-cache-ee-docker/go-proxy-cache:{{ .Values.goproxycache.image.tag }}
image: fabiocicerchia/go-proxy-cache:{{ .Values.goproxycache.image.tag }}

Check warning on line 126 in kubernetes/helm/templates/deployment.yaml

View workflow job for this annotation

GitHub Actions / Lint Code Base

[line-length] line too long (83 > 80 characters)

Check warning on line 126 in kubernetes/helm/templates/deployment.yaml

View workflow job for this annotation

GitHub Actions / Lint Code Base

[line-length] line too long (83 > 80 characters)
args:
- go-proxy-cache
securityContext:
Expand Down

0 comments on commit 33d3629

Please sign in to comment.