mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-21 01:06:55 -06:00
merged README from 6.x
This commit is contained in:
@@ -16,7 +16,7 @@ JFrog Container Registry can be installed into either an ECS or EKS cluster.
|
|||||||
|
|
||||||
To simply get up and running, you can try:
|
To simply get up and running, you can try:
|
||||||
|
|
||||||
```docker run -d -p 8081:8081 <image-url>```
|
```docker run -d -p 8081:8081 -p 8082:8082 <image-url>```
|
||||||
After this, you can access the UI at \<URL\>:8081. The default username is 'admin'. See 'Getting or setting initial password' to find out how to get the initial password.
|
After this, you can access the UI at \<URL\>:8081. The default username is 'admin'. See 'Getting or setting initial password' to find out how to get the initial password.
|
||||||
|
|
||||||
### Getting or setting initial password
|
### Getting or setting initial password
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"router": {
|
|
||||||
"node_id": "1dae71383ae3",
|
|
||||||
"state": "HEALTHY",
|
|
||||||
"message": "OK"
|
|
||||||
},
|
|
||||||
"services": [
|
|
||||||
{
|
|
||||||
"service_id": "jfac@01e49jb08bm7051xb2rp9k1ed8",
|
|
||||||
"node_id": "1dae71383ae3",
|
|
||||||
"state": "UNHEALTHY_PEER",
|
|
||||||
"message": "Service is healthy; there is at least one unhealthy service; there are missing services: jffe"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"service_id": "jfmd@01e49jbpqfhn39k8z3kyvqepzh",
|
|
||||||
"node_id": "1dae71383ae3",
|
|
||||||
"state": "UNHEALTHY_PEER",
|
|
||||||
"message": "Service is healthy; there is at least one unhealthy service; there are missing services: jffe"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"service_id": "jfrt@01e49jcq7t96ag11tq25h60759",
|
|
||||||
"node_id": "1dae71383ae3",
|
|
||||||
"state": "UNHEALTHY",
|
|
||||||
"message": "unexpected response status code: 503"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,89 +1,88 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
VERSION=$1
|
VERSION=$1
|
||||||
EDITIONS=( artifactory-pro artifactory-jcr )
|
EDITIONS=( artifactory-pro artifactory-jcr )
|
||||||
#EDITIONS=( artifactory-jcr )
|
|
||||||
#EDITIONS=( artifactory-pro )
|
|
||||||
|
|
||||||
|
|
||||||
#for loop start: editoins
|
#for loop start: editoins
|
||||||
for EDITION in "${EDITIONS[@]}"
|
for EDITION in "${EDITIONS[@]}"
|
||||||
do
|
do
|
||||||
UPSTREAM_IMAGE_NAME=docker.bintray.io/jfrog/$EDITION
|
UPSTREAM_IMAGE_NAME=docker.bintray.io/jfrog/$EDITION
|
||||||
BUILD_IMAGE_NAME=partnership-public-images.jfrog.io/aws/$EDITION
|
BUILD_IMAGE_NAME=partnership-public-images.jfrog.io/aws/$EDITION
|
||||||
ARTIFACTORY_PASSWORD=corona1831
|
ARTIFACTORY_PASSWORD=corona1831
|
||||||
|
|
||||||
# Logic starts here
|
# Logic starts here
|
||||||
if [ -z "$VERSION" ]
|
if [ -z "$VERSION" ]
|
||||||
then
|
then
|
||||||
echo "No version passed in. Build failed."
|
echo "No version passed in. Build failed."
|
||||||
echo "usage: buildAwsContainers <vesion> <edition>"
|
echo "usage: buildAwsContainers <vesion>"
|
||||||
echo "example: buildAwsContainers artifactory-pro 7.2.1 "
|
echo "example: buildAwsContainers 7.2.1 "
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Extract and modify the entrypoint to run out custom code for first-time password
|
# Extract and modify the entrypoint to run out custom code for first-time password
|
||||||
docker pull $UPSTREAM_IMAGE_NAME:$VERSION
|
docker pull $UPSTREAM_IMAGE_NAME:$VERSION
|
||||||
docker run -d --rm --name tmp-docker $UPSTREAM_IMAGE_NAME:$VERSION
|
docker run -d --rm --name tmp-docker $UPSTREAM_IMAGE_NAME:$VERSION
|
||||||
docker cp tmp-docker:/entrypoint-artifactory.sh original-entrypoint.sh
|
docker cp tmp-docker:/entrypoint-artifactory.sh original-entrypoint.sh
|
||||||
docker rm -f tmp-docker
|
docker rm -f tmp-docker
|
||||||
perl -pe 's/^addExtraJavaArgs$/`cat extra_conf`/ge' original-entrypoint.sh > entrypoint-artifactory.sh
|
perl -pe 's/^addExtraJavaArgs$/`cat extra_conf`/ge' original-entrypoint.sh > entrypoint-artifactory.sh
|
||||||
|
|
||||||
#Create installer-info file
|
#Create installer-info file
|
||||||
if [ "$EDITION" == "artifactory-pro" ]
|
if [ "$EDITION" == "artifactory-pro" ]
|
||||||
then
|
then
|
||||||
cat <<EOF > installer-info.json
|
cat <<" EOF" > installer-info.json
|
||||||
{
|
|
||||||
"productId": "CloudFormation_artifactory-ha/$VERSION",
|
|
||||||
"features": [
|
|
||||||
{
|
{
|
||||||
"featureId": "Partner/ACC-006973"
|
"productId": "CloudFormation_artifactory-ha/$VERSION",
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"featureId": "Partner/ACC-006973"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
EOF
|
||||||
}
|
else
|
||||||
EOF
|
cat <<" EOF" > installer-info.json
|
||||||
else
|
|
||||||
cat <<EOF > installer-info.json
|
|
||||||
{
|
|
||||||
"productId": "CloudFormation_artifactory-jcr/$VERSION",
|
|
||||||
"features": [
|
|
||||||
{
|
{
|
||||||
"featureId": "Partner/ACC-006973"
|
"productId": "CloudFormation_artifactory-jcr/$VERSION",
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"featureId": "Partner/ACC-006973"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
EOF
|
||||||
}
|
fi
|
||||||
EOF
|
cat installer-info.json
|
||||||
fi
|
|
||||||
cat installer-info.json
|
|
||||||
|
|
||||||
# Create the new docker image
|
# Create the new docker image
|
||||||
docker build --no-cache --build-arg UPSTREAM_TAG=$VERSION -t $BUILD_IMAGE_NAME:$VERSION .
|
docker build --no-cache --build-arg UPSTREAM_TAG=$VERSION -t $BUILD_IMAGE_NAME:$VERSION .
|
||||||
|
|
||||||
# Run minimal test
|
# Run minimal test
|
||||||
set -x
|
set -x
|
||||||
docker run --name test-new-image -d -e ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD -p 8081:8081 -p 8082:8082 $BUILD_IMAGE_NAME:$VERSION
|
docker run --name test-new-image -d -e ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD -p 8081:8081 -p 8082:8082 $BUILD_IMAGE_NAME:$VERSION
|
||||||
# Wait for it to come up
|
# Wait for it to come up
|
||||||
SUCCESS=false
|
SUCCESS=false
|
||||||
for i in {1..30}
|
for i in {1..30}
|
||||||
do
|
do
|
||||||
STATUS=$(curl -u admin:$ARTIFACTORY_PASSWORD http://localhost:8082/router/api/v1/system/health | jq .services[0].state)
|
STATUS=$(curl -u admin:$ARTIFACTORY_PASSWORD http://localhost:8082/router/api/v1/system/health | jq .services[0].state)
|
||||||
if [ "$STATUS" == "\"HEALTHY\"" ]; then
|
if [ "$STATUS" == "\"HEALTHY\"" ]; then
|
||||||
echo "Build successful!"
|
echo "Build successful!"
|
||||||
SUCCESS=true
|
SUCCESS=true
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "Container is not up yet, waiting 10 seconds..."
|
echo "Container is not up yet, waiting 10 seconds..."
|
||||||
sleep 10
|
sleep 10
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$SUCCESS" = true ] ; then
|
#clearnup
|
||||||
echo "Test Succeeded. Build succeeded."
|
docker stop test-new-image
|
||||||
else
|
docker rm test-new-image
|
||||||
echo "Test failed. Build failed. Removing docker image"
|
rm installer-info.json
|
||||||
fi
|
|
||||||
#clearnup
|
|
||||||
docker stop test-new-image
|
if [ "$SUCCESS" = true ] ; then
|
||||||
docker rm test-new-image
|
echo "Test Succeeded. Build succeeded."
|
||||||
rm installer-info.json
|
else
|
||||||
|
echo "Test failed. Build failed. Removing docker image"
|
||||||
#for loop endL: editions
|
exit 1
|
||||||
|
fi
|
||||||
|
#for loop endL: editions
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user