Standalone Uninstall
For Helm-managed installations, Develocity can be uninstalled by running helm uninstall «your-release-name»
:
Example:
$ helm uninstall --namespace gradle-enterprise ge-standalone
Kubernetes Uninstall
For Helm-managed installations, Develocity can be uninstalled by running helm uninstall «your-release-name»
:
Example:
$ helm uninstall --namespace gradle-enterprise ge-standalone
If running helm template
and applying to your cluster manually, Develocity can be deleted a number of ways:
-
If Develocity is the only thing in the namespace that is has been installed to, you can delete the namespace.
$ kubectl delete namespace gradle-enterprise
-
Alternatively, delete all resources that were created in the generated manifest from the last install or upgrade.
$ kubectl --namespace gradle-enterprise delete -f gradle-enterprise.yaml
For storage classes with a 'delete' reclaim policy this will mean that all data will also be lost. |
If using storage classes with a 'retain' reclaim policy, you will need to review remaining persistent volumes in your cluster after uninstalling to reclaim the space used.
Provider based Uninstall
For uninstallation steps based on your cloud provider of choice, select from your options below:
Deleting your AWS EC2 Instance
This section will walk you through tearing down Develocity and deleting any resources on AWS EC2.
To delete your instance, run:
$ INSTANCE_ID=$(
aws ec2 describe-instances \
--filters Name=tag-key,Values=gradle-enterprise \
--query Reservations[0].Instances[0].InstanceId \
--output text
)
$ aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
This command assumes that only one instance was created. If you have other instances with the tag gradle-enterprise , you may need to alter the Reservations index. |
To also remove the security group you created, run:
$ SECURITY_GROUP_ID=$(
aws ec2 describe-security-groups \
--filters Name=group-name,Values=ge-sg \
--query 'SecurityGroups[0].GroupId' --output text
)
$ aws ec2 delete-security-group --group-id ${SECURITY_GROUP_ID}
This will fail until deletion of the EC2 instance has finished. |
And for the SSH key pair:
$ aws ec2 delete-key-pair --key-name GradleEnterpriseKeyPair
If you have other resources such as a user-managed database or S3 Build Scan storage, teardown instructions are in their respective sections below.
RDS Teardown
To delete the RDS instance, run:
Deleting an RDS instance also deletes any automated backups of its database. However, by default, the deletion command will create a final snapshot of the database. |
$ aws rds delete-db-instance \
--db-instance-identifier gradle-enterprise-database \
--final-db-snapshot-identifier gradle-enterprise-db-snapshot
The delete-db-instance command requires that your instance is running so that it can create a final snapshot. You can skip the final snapshot and avoid this by passing --skip-final-snapshot instead of --final-db-snapshot-identifier gradle-enterprise-db-snapshot . |
The command will complete immediately, but deletion will likely take some time.
For more details on RDS instance deletion, consult AWS’s guide. |
To also delete the security group, run:
$ RDS_SECURITY_GROUP_ID=$(
aws ec2 describe-security-groups \
--filters Name=group-name,Values=ge-db-sg \
--query 'SecurityGroups[0].GroupId' --output text
)
$ aws ec2 delete-security-group --group-id ${RDS_SECURITY_GROUP_ID}
This will fail until deletion of the database instance has finished. |
S3 Teardown
To delete your S3 bucket, run:
$ ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
$ aws s3 rb s3://gradle-enterprise-build-scans-${ACCOUNT_ID} --force
Deleting your S3 bucket will delete all stored Build Scans. Develocity features that rely on historical analysis (e.g. test analytics, predictive test selection) will fail or will provide less useful information. |
Once you have deleted your EC2 instance, you can also delete your IAM resources by running the following commands:
$ aws iam remove-role-from-instance-profile \
--instance-profile-name "GradleEnterprise_BuildScans_S3_InstanceProfile" \
--role-name "GradleEnterprise_BuildScans_S3_Role"
$ aws iam delete-instance-profile --instance-profile-name GradleEnterprise_BuildScans_S3_InstanceProfile
$ ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
$ aws iam detach-role-policy \
--role-name "GradleEnterprise_BuildScans_S3_Role" \
--policy-arn "arn:aws:iam::${ACCOUNT_ID}:policy/gradle-enterprise-build-scan-access" (1)
1 | The ARN of the policy you created. |
$ aws iam delete-role --role-name GradleEnterprise_BuildScans_S3_Role
$ aws iam delete-policy --policy-arn "arn:aws:iam::${ACCOUNT_ID}:policy/gradle-enterprise-build-scan-access" (1)
1 | The ARN of the policy you created. |
If you didn’t get full IAM permissions, you may not be able to do this yourself. |
Deleting your AWS EKS Cluster
This section will walk you through tearing down Develocity and deleting any resources on AWS EKS.
To start, uninstall the Develocity helm chart:
$ helm uninstall --namespace gradle-enterprise ge
If you have other resources such as a user-managed database or S3 Build Scan storage, teardown instructions are in their respective sections below.
If you are using other resources in the cluster’s VPC (such as an RDS instance), eksctl will fail to delete the VPC unless you delete those resources first. If this happens, the VPC and CloudFormation stack can be manually deleted. However, it’s generally easier to delete those resources first. |
Then you can delete your cluster by running:
$ eksctl delete cluster --name gradle-enterprise
RDS Teardown
To delete the RDS instance, run:
Deleting an RDS instance also deletes any automated backups of its database. However, by default, the deletion command will create a final snapshot of the database. |
$ aws rds delete-db-instance \
--db-instance-identifier gradle-enterprise-database \
--final-db-snapshot-identifier gradle-enterprise-db-snapshot
The delete-db-instance command requires that your instance is running so that it can create a final snapshot. You can skip the final snapshot and avoid this requirement by passing --skip-final-snapshot instead of --final-db-snapshot-identifier gradle-enterprise-db-snapshot . |
The command will complete immediately, but deletion will likely take some time.
For more details on RDS instance deletion, consult AWS’s guide. |
To also delete the security group, run:
$ RDS_SECURITY_GROUP_ID=$(
aws ec2 describe-security-groups \
--filters Name=group-name,Values=ge-db-sg \
--query 'SecurityGroups[0].GroupId' --output text
)
$ aws ec2 delete-security-group --group-id ${RDS_SECURITY_GROUP_ID}
This will fail until deletion of the database instance has finished. |
And for the subnet group, run:
$ aws rds delete-db-subnet-group --db-subnet-group-name ge-db-subnet-group
This will fail until deletion of the database instance has finished. |
S3 Teardown
To delete your S3 bucket, run:
$ ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
$ aws s3 rb s3://gradle-enterprise-build-scans-${ACCOUNT_ID} --force
The role you created will be deleted when you delete the cluster.
Deleting your S3 bucket will delete all stored Build Scans. Develocity features that rely on historical analysis (e.g. test analytics, predictive test selection) will fail or will provide less useful information. |
Once the cluster is deleted, you can also delete your IAM policy by running the following commands:
$ ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
$ POLICY_ARN="arn:aws:iam::${ACCOUNT_ID}:policy/eksctl-gradle-enterprise-build-scan-access" (1)
$ aws iam delete-policy --policy-arn ${POLICY_ARN}
1 | The ARN of the policy you created. |