-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enhance CI automation (#106) * Add ServiceTelemetry overrides Allows ServiceTelemetry overrides to be expressed via Ansible extra-vars. Adds the four main overrides you would expect in a ServiceTelemetry object, with appropriate defaults set. Will also allow passing in the service_telemetry_manifest as a whole object like what we do with the Service Telemetry Operator. * Allow for per-repo branch overrides Allow for per-repo branch overrides for the Smart Gateway Operator and Smart Gateway repositories via sgo_branch and sg_branch (respectively). * Add functionality around quickstart.sh Add some functionality that was replaced when I dropped the quickstart.sh. Adds some of this functionality back in and also adds some new stuff. * Fix syntax error * Add back quickstart.sh Adds back a quickstart.sh that simulates the same result as the old quickstart.sh * Better CSV modification support Also adds some tags to make skipping over builds for testing much easier. * Debugging ci.yml firing * Make sure namespace is set before using it * Fix syntax and documentation * Test locally first kids * Drop CI debug lines * Clean up working repo clones * Copy CSV into working directory On subsequent runs the in-place modification of the CSV can cause issues either in the development environment, or re-runs of the CI system. Copying the CSV out of the in-place repo into a working location, and then modifying in-place results in a cleaner setup. By doing the copy of the CSV files, we can drop the need to force clone the supporting repositories. Also cleans up some shell commands that were commented out now that they are being dealt with via the replace module. Removes the extra commands added to ci.yml. * Changes to infrared-openstack.sh for OSP13 (#102) * Migrate OSP16 script to OSP13 directory Uses a multi-cloud stf-connectors.yaml style configuration which directly loads the resource lists rather than a list of environment files. Uses the same script as used in OSP16 but subs out the network configuration for a vlan type setup and the latest paths for async puddle. * Working deployment of OSP13 * Migrate changes to align to existing docs Update PR to align to existing documentation and testing the group has been working on. Adjust the stf-connectors.yaml.template to better reflect what we've been testing. Deployment by default will result in presettle: true which is bad for reliability of message delivery. * Get closer alignment to OSP16 setup * Enable deployment of metric SG for Ceilometer data (#93) * Enable deployment of metric SG for Ceilometer data Depends-On: infrawatch/smart-gateway#83 Depends-On: infrawatch/smart-gateway-operator#48 * Add smoketest for Ceilometer data * Listen on correct channel * Ceilometer smoketest tuning Makes smoketest_ceilometer_entrypoint.sh being executed during smoketest job. * Use data source setting for metrics too # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch mmagr-amqp10connections # Changes to be committed: # modified: roles/servicetelemetry/templates/manifest_smartgateway_metrics.j2 # * Finish ceilometer events smoke test * Do not use hardcoded timestamps * Finish ceilometer metrics smoketests * Increase timeout * Add container names * Validate also Ceilometer metrics SG * Update tests/smoketest/smoketest_ceilometer_entrypoint.sh * Update tests/smoketest/smoketest_collectd_entrypoint.sh Co-authored-by: Martin Magr <[email protected]> Co-authored-by: Leif Madsen <[email protected]> * Implement CI updates for SG3 * Correct value for SG bridge image path * Lock operator-courier to 2.1.7 Lock operator-courier to 2.1.7 until we can figure out what is wrong with our CSV/CRD setup or until the operator-courier issue noted in the related issue is resolved. Related: #108 * Update build/stf-run-ci/tasks/main.yml Co-authored-by: Chris Sibbitt <[email protected]> * Adjust README to match run-ci.yaml methods Co-authored-by: Martin Mágr <[email protected]> Co-authored-by: Martin Magr <[email protected]> Co-authored-by: Chris Sibbitt <[email protected]>
- Loading branch information
1 parent
3970678
commit 89cba07
Showing
23 changed files
with
898 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,60 @@ | ||
--- | ||
# clone our other repositories into this repo | ||
# NOTE: since you can't loop against blocks (and we're using them for failure # | ||
# recovery when the request branch doesn't exist) we have to define each | ||
# of these separately rather than using a loop. | ||
- name: Get Smart Gateway Operator | ||
block: | ||
- name: Try cloning same-named branch | ||
- name: Try cloning same-named branch or override branch | ||
git: | ||
repo: https://github.com/infrawatch/smart-gateway-operator | ||
dest: working/smart-gateway-operator | ||
version: "{{ branch }}" | ||
version: "{{ sgo_branch | default(branch, true) }}" | ||
rescue: | ||
- name: Get master branch because same-named doesn't exist | ||
git: | ||
repo: https://github.com/infrawatch/smart-gateway-operator | ||
dest: working/smart-gateway-operator | ||
version: master | ||
|
||
- name: Get Smart Gateway | ||
- name: Get Smart Gateway (legacy) | ||
block: | ||
- name: Try cloning same-named branch | ||
- name: Try cloning same-named branch or override branch | ||
git: | ||
repo: https://github.com/infrawatch/smart-gateway | ||
dest: working/smart-gateway | ||
version: "{{ branch }}" | ||
version: "{{ sg_branch | default(branch, true) }}" | ||
rescue: | ||
- name: Get master branch because same-named doesn't exist | ||
git: | ||
repo: https://github.com/infrawatch/smart-gateway | ||
dest: working/smart-gateway | ||
version: master | ||
|
||
- name: Get sg-core | ||
block: | ||
- name: Try cloning same-named branch or override branch | ||
git: | ||
repo: https://github.com/infrawatch/sg-core | ||
dest: working/sg-core | ||
version: "{{ sg_core_branch | default(branch, true) }}" | ||
rescue: | ||
- name: Get master branch because same-named doesn't exist | ||
git: | ||
repo: https://github.com/infrawatch/sg-core | ||
dest: working/sg-core | ||
version: master | ||
|
||
- name: Get sg-bridge | ||
block: | ||
- name: Try cloning same-named branch or override branch | ||
git: | ||
repo: https://github.com/infrawatch/sg-bridge | ||
dest: working/sg-bridge | ||
version: "{{ sg_bridge_branch | default(branch, true) }}" | ||
rescue: | ||
- name: Get master branch because same-named doesn't exist | ||
git: | ||
repo: https://github.com/infrawatch/sg-bridge | ||
dest: working/sg-bridge | ||
version: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,21 @@ | ||
--- | ||
# TODO: not super pretty but it seems to work for now. Would be a bit cleaner | ||
# perhaps if we imported a semver function of some sort. | ||
- name: Get latest CSV for Smart Gateway Operator | ||
shell: | | ||
ls -1v --hide=*.yaml working/smart-gateway-operator/deploy/olm-catalog/smart-gateway-operator/ | tail -1 | ||
register: sgo_current_csv | ||
|
||
- name: Get latest CSV for Service Telemetry Operator | ||
shell: | | ||
ls -1v --hide=*.yaml ../deploy/olm-catalog/service-telemetry-operator/ | tail -1 | ||
register: sto_current_csv | ||
|
||
- name: Load Smart Gateway Operator RBAC | ||
command: oc apply -f working/smart-gateway-operator/deploy/{{ item }} | ||
loop: | ||
- service_account.yaml | ||
- role.yaml | ||
- role_binding.yaml | ||
- olm-catalog/smart-gateway-operator/{{ sgo_current_csv.stdout }}/smartgateway.infra.watch_smartgateways_crd.yaml | ||
|
||
# TODO: I'm sorry this is pretty messy. There is probably an Ansible module | ||
# that would make this a bit cleaner to read. Likely start with lineinfile or a | ||
# filter that could parse the contents inline via lookup to the k8s module | ||
- name: Load Smart Gateway Operator CSV | ||
shell: | | ||
sed -e "s#quay.io/infrawatch/smart-gateway:latest#{{ sg_image_path }}#g;s#quay.io/infrawatch/smart-gateway-operator:latest#{{ sgo_image_path }}#g;s#placeholder#{{ namespace }}#g" working/smart-gateway-operator/deploy/olm-catalog/smart-gateway-operator/{{ sgo_current_csv.stdout }}/smart-gateway-operator.v{{ sgo_current_csv.stdout }}.clusterserviceversion.yaml | oc apply -f - | ||
- name: Load Service Telemetry Operator RBAC | ||
command: oc apply -f ../deploy/{{ item }} | ||
loop: | ||
- service_account.yaml | ||
- role.yaml | ||
- role_binding.yaml | ||
- olm-catalog/service-telemetry-operator/{{ sto_current_csv.stdout }}/infra.watch_servicetelemetrys_crd.yaml | ||
|
||
- name: Load Service Telemetry Operator CSV | ||
shell: | | ||
sed -e "s#quay.io/infrawatch/service-telemetry-operator:v{{ sto_current_csv.stdout }}#{{ sto_image_path }}#g;s#placeholder#{{ namespace }}#g" ../deploy/olm-catalog/service-telemetry-operator/{{ sto_current_csv.stdout }}/service-telemetry-operator.v{{ sto_current_csv.stdout }}.clusterserviceversion.yaml | oc apply -f - | ||
- name: Wait for Service Telemetry Operator to be Succeeded | ||
shell: | | ||
while ! oc get csv | grep service-telemetry-operator | grep Succeeded; do echo "waiting for Service Telemetry Operator..."; sleep 3; done | ||
# NOTE: be aware that if the API version changes for the ServiceTelemetry | ||
# object that it'll need to be updated here | ||
- name: Create ServiceTelemetry instance | ||
k8s: | ||
definition: | ||
- name: Create default ServiceTelemetry manifest | ||
set_fact: | ||
service_telemetry_manifest: | | ||
apiVersion: infra.watch/v1alpha1 | ||
kind: ServiceTelemetry | ||
metadata: | ||
name: stf-default | ||
namespace: "{{ namespace }}" | ||
spec: | ||
eventsEnabled: true | ||
highAvailabilityEnabled: false | ||
metricsEnabled: true | ||
eventsEnabled: {{ __service_telemetry_events_enabled }} | ||
highAvailabilityEnabled: {{ __service_telemetry_high_availability_enabled }} | ||
metricsEnabled: {{ __service_telemetry_metrics_enabled }} | ||
storageEphemeralEnabled: {{ __service_telemetry_storage_ephemeral_enabled }} | ||
when: service_telemetry_manifest is not defined | ||
|
||
- name: Create ServiceTelemetry instance | ||
k8s: | ||
definition: | ||
'{{ service_telemetry_manifest }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
- name: Wait for Service Telemetry Operator to be Succeeded | ||
shell: | | ||
while ! oc get csv | grep service-telemetry-operator | grep Succeeded; do echo "waiting for Service Telemetry Operator..."; sleep 3; done |
Oops, something went wrong.