Skip to content

Commit

Permalink
Move Hive hack files under one directory
Browse files Browse the repository at this point in the history
Group the Hive files under hack directory to hack/hive
  • Loading branch information
razo7 committed Aug 27, 2024
1 parent e83bf05 commit 875ccaf
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ gomock_reflect_*
/portal/v2/node_modules/
portal/v2/.vscode/
.idea*
/hack/hive-config/crds
/hack/hive-config/hive-deployment.yaml
/hack/hive/hive-config/crds
/hack/hive/hive-config/hive-deployment.yaml
cmd/aro/__debug_bin
megalinter-reports/
/db
Expand Down
4 changes: 2 additions & 2 deletions docs/deploy-full-rp-service-in-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
1. Now that your machine is able access the AKS cluster, you can deploy Hive:
```bash
make aks.kubeconfig
./hack/hive-generate-config.sh
KUBECONFIG=$(pwd)/aks.kubeconfig ./hack/hive-dev-install.sh
./hack/hive/hive-generate-config.sh
KUBECONFIG=$(pwd)/aks.kubeconfig ./hack/hive/hive-dev-install.sh
```

1. Mirror the OpenShift images to your new ACR
Expand Down
13 changes: 7 additions & 6 deletions docs/hive.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Version

The commit sha is used to specify the image tag and also used during config generation to checkout the correct version of the config files. The config files are subsequently used by the `hack/hive-dev-install.sh` script during installation or during config updates.
The commit sha is used to specify the image tag and also used during config generation to checkout the correct version of the config files. The config files are subsequently used by the `hack/hive/hive-dev-install.sh` script during installation or during config updates.

1. You can either
1. Provide the hive image commit has as an argument to `hack/hive-generate-config.sh`. This is useful for testing new hive images before hive releases.
1. Example: `./hack/hive-generate-config.sh d7ead609f4`
1. Provide the hive image commit has as an argument to `hack/hive/hive-generate-config.sh`. This is useful for testing new hive images before hive releases.
1. Example: `./hack/hive/hive-generate-config.sh d7ead609f4`
2. Accept the default version by providing no arguments, which should be the latest.
1. Example: `./hack/hive-generate-config.sh`
1. Example: `./hack/hive/hive-generate-config.sh`

## Generating config

Expand All @@ -18,7 +18,7 @@ In order to generate config for a dev environment you need to ensure you have th
# source your environment file
. ./env
# run the config generation
./hack/hive-generate-config.sh
./hack/hive/hive-generate-config.sh
```

This will download the latest source, reset to the hash specified in HIVE_IMAGE_COMMIT_HASH, and build the config using kustomise.
Expand All @@ -41,5 +41,6 @@ This will download the latest source, reset to the hash specified in HIVE_IMAGE_
```
4. Installing then simply requires the running of the install script.
```bash
./hack/hive-dev-install.sh
./hack/hive/hive-dev-install.sh
```
> __NOTE:__ When Hive is already installed and SKIP_DEPLOYMENTS is set to "true" then Hive installation can be skipped without user's approval.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ generate_hive_config() {

# return to the repo directory to copy the generated config from $TMPDIR
popd 1> /dev/null
mv "$tmpd/hive-deployment.yaml" ./hack/hive-config/
mv "$tmpd/hive-deployment.yaml" ./hack/hive/hive-config/

if [ -d ./hack/hive-config/crds ]; then
rm -rf ./hack/hive-config/crds
if [ -d ./hack/hive/hive-config/crds ]; then
rm -rf ./hack/hive/hive-config/crds
fi
cp -R "$tmpd/config/crds" ./hack/hive-config/
cp -R "$tmpd/config/crds" ./hack/hive/hive-config/
}

if [ ! -f go.mod ] || [ ! -d ".git" ]; then
Expand Down

0 comments on commit 875ccaf

Please sign in to comment.