Skip to content

Commit

Permalink
Merge pull request #18 from canonical/2.9.0
Browse files Browse the repository at this point in the history
Bump to version 2.9.0
  • Loading branch information
Mehdi-Bendriss authored Jul 27, 2023
2 parents 47832c3 + d1e513b commit 353b573
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ jobs:
oci-archive:charmed-opensearch_${version}_amd64.rock \
docker-daemon:charmed-opensearch:${version}
- name: Setup the required system configs
run: |
sudo sysctl -w vm.swappiness=0
sudo sysctl -w vm.max_map_count=262144
sudo sysctl -w net.ipv4.tcp_retries2=5
- name: Start OpenSearch
run: |
version="$(cat rockcraft.yaml | yq .version)"
Expand All @@ -106,7 +112,7 @@ jobs:
container_0_ip=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' "${container_0_id}")
# wait a bit for it to fully initialize
sleep 15s
sleep 30s
# create data/voting_only node container
container_1_id=$(docker run \
Expand All @@ -120,7 +126,7 @@ jobs:
container_1_ip=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' "${container_1_id}")
# wait a bit for it to fully initialize
sleep 15s
sleep 30s
# create 2nd cm_node container
container_2_id=$(docker run \
Expand All @@ -134,25 +140,25 @@ jobs:
container_2_ip=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' "${container_2_id}")
# wait a bit for it to fully initialize
sleep 15s
sleep 30s
- name: Ensure the cluster is reachable and nodes well joined
run: |
# test node
cluster_resp=$(curl -k -XGET http://127.0.0.1:9200)
cluster_resp=$(curl -sk -XGET http://127.0.0.1:9200)
echo -e "Cluster Response: \n ${cluster_resp}"
node_name=$(echo "${cluster_resp}" | jq -r .name)
if [ "${node_name}" != "cm0" ]; then
exit 1
fi
# query all nodes of cluster
successful_nodes="$(curl -k -XGET http://127.0.0.1:9200/_nodes | jq ._nodes.successful)"
successful_nodes="$(curl -sk -XGET http://127.0.0.1:9200/_nodes | jq ._nodes.successful)"
if [ "${successful_nodes}" != 3 ]; then
exit 1
fi
all_nodes="$(curl -k -XGET http://127.0.0.1:9200/_nodes/ | \
all_nodes="$(curl -sk -XGET http://127.0.0.1:9200/_nodes/ | \
jq '.nodes | values[] | .name' | \
jq -s '. |= if . then sort else empty end' | \
jq -r '. | values[]' | \
Expand Down
2 changes: 1 addition & 1 deletion rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: charmed-opensearch # the name of your ROCK
base: ubuntu:22.04 # the base environment for this ROCK
license: Apache-2.0

version: '2.8.0' # just for humans. Semantic versioning is recommended
version: '2.9.0' # just for humans. Semantic versioning is recommended

summary: 'Charmed OpenSearch ROCK OCI.'
description: |
Expand Down

0 comments on commit 353b573

Please sign in to comment.