Skip to content

Commit 18d27d2

Browse files
author
Kai Hudalla
committed
Support pushing images to other container registries.
Signed-off-by: Kai Hudalla <[email protected]>
1 parent 8eafaea commit 18d27d2

File tree

4 files changed

+16
-37
lines changed

4 files changed

+16
-37
lines changed

push_hono_images.sh

+12-2
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,27 @@
1313
#*******************************************************************************
1414

1515
TAG=$1
16+
CR=$2
1617

1718
if [ -n "$TAG" ]
1819
then
1920
for image in hono-adapter-http-vertx hono-adapter-mqtt-vertx hono-adapter-kura hono-adapter-amqp-vertx hono-service-auth hono-service-device-registry
2021
do
21-
docker push eclipse/$image:$TAG
22+
ECLIPSE_IMAGE_NAME="eclipse/$image"
23+
IMAGE_NAME=$ECLIPSE_IMAGE_NAME
24+
if [ -n "$CR" ]
25+
then
26+
IMAGE_NAME="$CR/$IMAGE_NAME"
27+
docker tag $ECLIPSE_IMAGE_NAME:$TAG $IMAGE_NAME:$TAG
28+
fi
29+
echo "pushing image $IMAGE_NAME:$TAG ..."
30+
docker push $IMAGE_NAME:$TAG
2231
done
2332
else
2433
echo "This script can be used to push Hono's images from"
2534
echo "the local Docker registry to Docker Hub."
2635
echo ""
27-
echo "usage: push_hono_images.sh TAG"
36+
echo "usage: push_hono_images.sh TAG [CR]"
2837
echo "where TAG is the TAG to push to Docker Hub"
38+
echo "and the (optional) CR is the name of the container registry to push to"
2939
fi

push_hono_images_private.sh

-31
This file was deleted.

site/content/deployment/azure-aks-helm.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ Now, you should see a list of containers with 2 tags:
124124

125125
Copy a second one and put as 1st parameter for following script:
126126
```bash
127-
sudo ./push_hono_images_private.sh 1.0-M2-SNAPSHOT $ACR_NAME.azurecr.io
127+
sudo ./push_hono_images.sh 1.0-M2-SNAPSHOT $ACR_NAME.azurecr.io
128128
```
129129
This script will tag and push container to your private repo.
130130

131131
## Create AKS cluster and deploy HONO
132132
---
133133
If you have skipped a previous block, you can use one of the deployment package from [here](https://www.eclipse.org/hono/download/). Make sure you have all required files (They can be found in [Eclipse Hono GitHub](https://github.com/eclipse/hono)):
134-
- push_hono_images_private.sh in ~/hono
134+
- push_hono_images.sh in ~/hono
135135
- dispatch-router-extlb-svc.yaml in ~/hono/deploy/helm/templates/dispatch-router
136136
- hono-adapter-amqp-vertx-extlb-svc.yaml in ~/hono/deploy/helm/templates/hono-adapter-amqp
137137
- hono-adapter-http-vertx-extlb-svc.yaml in ~/hono/deploy/helm/templates/hono-adapter-http

site/content/deployment/azure-aks.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Now, you should see a list of containers with 2 tags:
119119

120120
Copy a second one and put as 1st parameter for following script:
121121
```bash
122-
sudo ./push_hono_images_private.sh 1.0-M2-SNAPSHOT $ACR_NAME.azurecr.io
122+
sudo ./push_hono_images.sh 1.0-M2-SNAPSHOT $ACR_NAME.azurecr.io
123123
```
124124
This script will tag and push container to your private repo.
125125
#### Modify resource descriptors with new container names
@@ -139,7 +139,7 @@ grep -rl 'eclipse/' ./ | xargs sudo sed -i 's/eclipse\//'"$ACR_NAME"'.azurecr.io
139139
## Create AKS cluster and deploy HONO
140140
---
141141
If you have skipped a previous block, you can use one of the deployment package from [here](https://www.eclipse.org/hono/download/). Make sure you have all required files (They can be found in [Eclipse Hono GitHub](https://github.com/eclipse/hono)):
142-
- push_hono_images_private.sh in ~/hono
142+
- push_hono_images.sh in ~/hono
143143
- dispatch-router-ext-svc.yaml in ~/hono/deploy/resource-descriptors/azure
144144
- hono-adapter-amqp-vertx-ext-svc.yaml in ~/hono/deploy/resource-descriptors/azure
145145
- hono-adapter-http-vertx-ext-svc.yaml in ~/hono/deploy/resource-descriptors/azure

0 commit comments

Comments
 (0)