diff --git a/.github/workflows/build-container-images.yaml b/.github/workflows/build-container-images.yaml index 021892ef..8b4deb63 100644 --- a/.github/workflows/build-container-images.yaml +++ b/.github/workflows/build-container-images.yaml @@ -6,7 +6,7 @@ on: pull_request: paths: - "containers/argo_utils/**" - - "containers/obm-utils/**" + - "containers/bmc-utils/**" - "containers/python311_alpine/**" - "containers/python312_alpine/**" push: @@ -14,7 +14,7 @@ on: - main paths: - "containers/argo_utils/**" - - "containers/obm-utils/**" + - "containers/bmc-utils/**" - "containers/python311_alpine/**" - "containers/python312_alpine/**" @@ -23,7 +23,7 @@ env: VERSION_PYTHON311: 0.0.1 VERSION_PYTHON312: 0.0.1 VERSION_ARGO_UTILS: 0.0.1 - VERSION_OBM_UTILS: 0.0.1 + VERSION_BMC_UTILS: 0.0.1 VERSION_PYTHON_NAUTOBOT: 0.0.1 jobs: @@ -78,13 +78,13 @@ jobs: labels: | org.opencontainers.image.version=${{ env.VERSION_ARGO_UTILS }} - - name: Build and deploy OBM Utils image + - name: Build and deploy BMC Utils image uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6 with: - context: containers/obm-utils/ - file: containers/obm-utils/Dockerfile.obm_utils + context: containers/bmc-utils/ + file: containers/bmc-utils/Dockerfile.bmc_utils # push for all main branch commits push: ${{ github.event_name != 'pull_request' }} - tags: ghcr.io/${{ github.repository }}/argo-obm-utils-python3.11.8:latest,ghcr.io/${{ github.repository }}/argo-obm-utils-python3.11.8:${{ env.VERSION_OBM_UTILS }} + tags: ghcr.io/${{ github.repository }}/argo-bmc-utils-python3.11.8:latest,ghcr.io/${{ github.repository }}/argo-bmc-utils-python3.11.8:${{ env.VERSION_BMC_UTILS }} labels: | - org.opencontainers.image.version=${{ env.VERSION_OBM_UTILS }} + org.opencontainers.image.version=${{ env.VERSION_BMC_UTILS }} diff --git a/containers/argo_utils/README.md b/containers/argo_utils/README.md index 723b3249..61cb41a5 100644 --- a/containers/argo_utils/README.md +++ b/containers/argo_utils/README.md @@ -19,8 +19,8 @@ Currently Understack is not including any sort of secret store, outside of what - Credentials will be mounted from a Kubernetes Secret. - How those credential Secrets are created is up to you. -`workflowtemplates/get-obm-creds.yaml` and the placeholder secret provided in `deps/` are strictly that, placeholder. They have been provided to allow the workflows to execute, -however they will likely fail until a proper get-obm-creds Workflow is created. +`workflowtemplates/get-bmc-creds.yaml` and the placeholder secret provided in `deps/` are strictly that, placeholder. They have been provided to allow the workflows to execute, +however they will likely fail until a proper get-bmc-creds Workflow is created. ## Example ```bash diff --git a/containers/obm-utils/Dockerfile.obm_utils b/containers/bmc-utils/Dockerfile.bmc_utils similarity index 87% rename from containers/obm-utils/Dockerfile.obm_utils rename to containers/bmc-utils/Dockerfile.bmc_utils index 228d1fe5..432aa9e7 100644 --- a/containers/obm-utils/Dockerfile.obm_utils +++ b/containers/bmc-utils/Dockerfile.bmc_utils @@ -13,8 +13,8 @@ RUN --mount=type=cache,target=/root/.cache/.pip pip install --no-cache-dir -r /a FROM ${BASE} as prod -LABEL org.opencontainers.image.title="Python 3.11 image with OBM utils" -LABEL org.opencontainers.image.base.name="ghcr.io/rackerlabs/understack/argo-obm-utils-python3.11.8" +LABEL org.opencontainers.image.title="Python 3.11 image with BMC utils" +LABEL org.opencontainers.image.base.name="ghcr.io/rackerlabs/understack/argo-bmc-utils-python3.11.8" LABEL org.opencontainers.image.source=https://github.com/rackerlabs/understack ENV PATH="/opt/venv/bin:$PATH" diff --git a/containers/obm-utils/README.md b/containers/bmc-utils/README.md similarity index 60% rename from containers/obm-utils/README.md rename to containers/bmc-utils/README.md index 6da216e0..ed1ef48d 100644 --- a/containers/obm-utils/README.md +++ b/containers/bmc-utils/README.md @@ -1,16 +1,16 @@ # Overview -The WorkflowTemplates provided in this directory were created to provide common lifecycle and maintenance functions on OBM controllers. +The WorkflowTemplates provided in this directory were created to provide common lifecycle and maintenance functions on BMC controllers. ## Caveats -- TODO: the obm-sync-creds workflow logic should probably be broken to include an obm-update-password workflow, which then likely has more utility. +- TODO: the bmc-sync-creds workflow logic should probably be broken to include a bmc-update-password workflow, which then likely has more utility. ## Example ```bash -argo -n argo-events submit --from workflowtemplate/obm-sync-creds --parameter device_id=1de4f169-9848-4d8e-921b-65338c1e00ca +argo -n argo-events submit --from workflowtemplate/bmc-sync-creds --parameter device_id=1de4f169-9848-4d8e-921b-65338c1e00ca -Name: obm-sync-creds-wrn2c +Name: bmc-sync-creds-wrn2c Namespace: argo-events ServiceAccount: unset Status: Pending @@ -22,7 +22,7 @@ Parameters: ```bash argo -n argo-events get @latest -Name: obm-sync-creds-wrn2c +Name: bmc-sync-creds-wrn2c Namespace: argo-events ServiceAccount: workflow Status: Running @@ -37,14 +37,14 @@ Parameters: device_id: 1de4f169-9848-4d8e-921b-65338c1e00ca STEP TEMPLATE PODNAME DURATION MESSAGE - ● obm-sync-creds-wrn2c main - ├─✔ get-obm-creds get-obm-creds/main - │ └─✔ get-obm-creds get-obm-creds-ext/main - │ └─✔ get-obm-creds-ext get-creds-ext/main + ● bmc-sync-creds-wrn2c main + ├─✔ get-bmc-creds get-bmc-creds/main + │ └─✔ get-bmc-creds get-bmc-creds-ext/main + │ └─✔ get-bmc-creds-ext get-creds-ext/main │ ├─✔ get-ext-num get-ext-num/main - │ └─✔ get-creds-ext get-creds-ext obm-sync-creds-wrn2c-get-creds-ext-2059517959 5s - ├─✔ get-obm-ip get-obm-ip/main + │ └─✔ get-creds-ext get-creds-ext bmc-sync-creds-wrn2c-get-creds-ext-2059517959 5s + ├─✔ get-bmc-ip get-bmc-ip/main │ └───✔ nautobot-query nautobot-api/main │ └───✔ send-request http - └─◷ obm-sync-creds obm-sync-creds obm-sync-creds-wrn2c-obm-sync-creds-2727609696 28s + └─◷ bmc-sync-creds bmc-sync-creds bmc-sync-creds-wrn2c-bmc-sync-creds-2727609696 28s ``` diff --git a/containers/obm-utils/code/__init__.py b/containers/bmc-utils/code/__init__.py similarity index 100% rename from containers/obm-utils/code/__init__.py rename to containers/bmc-utils/code/__init__.py diff --git a/containers/obm-utils/code/obm_firmware_update.py b/containers/bmc-utils/code/bmc_firmware_update.py similarity index 90% rename from containers/obm-utils/code/obm_firmware_update.py rename to containers/bmc-utils/code/bmc_firmware_update.py index b982a0aa..33051461 100644 --- a/containers/obm-utils/code/obm_firmware_update.py +++ b/containers/bmc-utils/code/bmc_firmware_update.py @@ -18,17 +18,17 @@ if __name__ == "__main__": - parser = argparse.ArgumentParser(prog=os.path.basename(__file__), description="Update OBM firmware") - parser.add_argument("--host", required=True, help="The address of the OBM interface") + parser = argparse.ArgumentParser(prog=os.path.basename(__file__), description="Update BMC firmware") + parser.add_argument("--host", required=True, help="The address of the BMC interface") parser.add_argument("--firmware-url", required=True, help="URL of firmware") args = parser.parse_args() host = args.host firmware_url = args.firmware_url - username = os.environ["OBM_USERNAME"] - password = os.environ["OBM_PASSWORD"] + username = os.environ["BMC_USERNAME"] + password = os.environ["BMC_PASSWORD"] - logger.info("Fetching OBM update service ...") + logger.info("Fetching BMC update service ...") authn = sushy.auth.SessionOrBasicAuth(username, password) c = sushy.Sushy(f"https://{host}/redfish/v1/", verify=False, auth=authn) diff --git a/containers/obm-utils/code/obm_sync_creds.py b/containers/bmc-utils/code/bmc_sync_creds.py similarity index 78% rename from containers/obm-utils/code/obm_sync_creds.py rename to containers/bmc-utils/code/bmc_sync_creds.py index 7e151fd7..9c4e93ac 100644 --- a/containers/obm-utils/code/obm_sync_creds.py +++ b/containers/bmc-utils/code/bmc_sync_creds.py @@ -43,8 +43,8 @@ def verify_auth(host: str, username: str = "root", password: str = "") -> bool: return False -def get_obm_accounts(host: str, username: str, password: str) -> List[Dict]: - """A vendor agnostic approach to crawling the API for OBM accounts""" +def get_bmc_accounts(host: str, username: str, password: str) -> List[Dict]: + """A vendor agnostic approach to crawling the API for BMC accounts""" try: # get account service r = redfish_request(host, "/redfish/v1", username, password) @@ -67,10 +67,10 @@ def get_obm_accounts(host: str, username: str, password: str) -> List[Dict]: raise -def set_obm_creds(host: str, username: str, password: str, expected_username: str, expected_password: str) -> bool: +def set_bmc_creds(host: str, username: str, password: str, expected_username: str, expected_password: str) -> bool: """Find the account associated with the username in question""" try: - accounts = get_obm_accounts(host, username, password) + accounts = get_bmc_accounts(host, username, password) matched_account = None for account in accounts: @@ -83,7 +83,7 @@ def set_obm_creds(host: str, username: str, password: str, expected_username: st break if not matched_account: - raise Exception(f"Unable to find OBM account for {expected_username}") + raise Exception(f"Unable to find BMC account for {expected_username}") account_uri = matched_account["@odata.id"] @@ -97,39 +97,39 @@ def set_obm_creds(host: str, username: str, password: str, expected_username: st if __name__ == "__main__": parser = argparse.ArgumentParser( - prog=os.path.basename(__file__), description="Attempts to find the correct OBM credentials for a device" + prog=os.path.basename(__file__), description="Attempts to find the correct BMC credentials for a device" ) - parser.add_argument("--host", required=True, help="the address of the obm interface for the device") + parser.add_argument("--host", required=True, help="the address of the bmc interface for the device") args = parser.parse_args() host = args.host - expected_username = os.environ["OBM_USERNAME"] - expected_password = os.environ["OBM_PASSWORD"] + expected_username = os.environ["BMC_USERNAME"] + expected_password = os.environ["BMC_PASSWORD"] - legacy_passwords = json.loads(os.getenv("OBM_LEGACY_PASSWORDS", "[]")) + legacy_passwords = json.loads(os.getenv("BMC_LEGACY_PASSWORDS", "[]")) if not legacy_passwords: - logger.info("env variable OBM_LEGACY_PASSWORDS was not set.") + logger.info("env variable BMC_LEGACY_PASSWORDS was not set.") sys.exit(1) - logger.info("Ensuring OBM credentials are synced correctly ...") + logger.info("Ensuring BMC credentials are synced correctly ...") if verify_auth(host, expected_username, expected_password): - logger.info("OBM credentials are in sync.") + logger.info("BMC credentials are in sync.") sys.exit(0) else: - logger.info("OBM credentials are NOT in sync. Trying known legacy/vendor credentials ...") + logger.info("BMC credentials are NOT in sync. Trying known legacy/vendor credentials ...") # iDRAC defaults to blocking an IP address after 3 bad login attempts within 60 second. Since we have the # initial attempt above, we will sleep 35 seconds between any additional attempts. delay = 60 - username = os.getenv("OBM_LEGACY_USER", "root") + username = os.getenv("BMC_LEGACY_USER", "root") for password in legacy_passwords: logger.info(f"Delaying for {delay} seconds to prevent failed auth lockouts ...") time.sleep(delay) if verify_auth(host, username, password): - if set_obm_creds(host, username, password, expected_username, expected_password): - logger.info("OBM password has been synced.") + if set_bmc_creds(host, username, password, expected_username, expected_password): + logger.info("BMC password has been synced.") sys.exit(0) - logger.info("Unable to sync the OBM password.") + logger.info("Unable to sync the BMC password.") sys.exit(1) diff --git a/containers/obm-utils/requirements.txt b/containers/bmc-utils/requirements.txt similarity index 100% rename from containers/obm-utils/requirements.txt rename to containers/bmc-utils/requirements.txt diff --git a/docs/component-argo-workflows.md b/docs/component-argo-workflows.md index a4d3bfe8..4422c1cf 100644 --- a/docs/component-argo-workflows.md +++ b/docs/component-argo-workflows.md @@ -9,16 +9,16 @@ set of WorkflowTemplates below. | WorkflowTemplate | Description | Input | Output | | |---------------------- |-----------------------------------------------------------|-------------------------|------------|---| | get-device-nautobot | Return Device Information from Nautobot | device_id | device | | -| get-obm-creds | Get the credentials for the target Device | device_id | secret | * | -| get-obm-ip | Get OBM IP address for target Device | device_id | ip | | +| get-bmc-creds | Get the credentials for the target Device | device_id | secret | * | +| get-bmc-ip | Get BMC IP address for target Device | device_id | ip | | | nautobot-api | HTTP Template Workflow to query the Nautobot API | method,nautobot_url,uri | result | | -| obm-firmware-update | Update OBM firmware on target Device | device_id | | | -| obm-sync-creds | Sync's a devices OBM password with what we have on record | device_id | | | +| bmc-firmware-update | Update BMC firmware on target Device | device_id | | | +| bmc-sync-creds | Sync's a devices BMC password with what we have on record | device_id | | | \* WorkflowTemplate which requires a manual / custom implementation. As Understack develops, there may be underlying / dependant services which are not included, and require some of the -included WorkflowTemplates to be manually implemented to work in your environment. For example, the get-obm-creds +included WorkflowTemplates to be manually implemented to work in your environment. For example, the get-bmc-creds WorkflowTemplate will need to be written to communicate with whatever service you're using to store your device credentials. @@ -53,7 +53,7 @@ the Pod's uid can be passed via the `KUBERNETES_POD_UID` environment variable. T completion of the Workflow `.spec.podGC.strategy` can be set to `OnWorkflowCompletion`. An example WorkflowTemplate demonstrating argo-python usage can be found -[here](https://github.com/rackerlabs/understack/blob/main/workflows/argo-events/workflowtemplates/get-obm-creds.yaml). +[here](https://github.com/rackerlabs/understack/blob/main/workflows/argo-events/workflowtemplates/get-bmc-creds.yaml). ### Argo CLI diff --git a/python/understack-workflows/pyproject.toml b/python/understack-workflows/pyproject.toml index ea437779..40c7594a 100644 --- a/python/understack-workflows/pyproject.toml +++ b/python/understack-workflows/pyproject.toml @@ -45,7 +45,7 @@ requests-mock = "^1.12.1" [tool.poetry.scripts] sync-keystone = "understack_workflows.main.sync_keystone:main" sync-interfaces = "understack_workflows.main.sync_interfaces:main" -sync-obm-creds = "understack_workflows.main.sync_obm_creds:main" +sync-bmc-creds = "understack_workflows.main.sync_bmc_creds:main" sync-server = "understack_workflows.main.sync_server:main" sync-provision-state = "understack_workflows.main.sync_provision_state:main" sync-nautobot-interfaces = "understack_workflows.main.sync_nautobot_interfaces:main" diff --git a/python/understack-workflows/understack_workflows/main/sync_obm_creds.py b/python/understack-workflows/understack_workflows/main/sync_bmc_creds.py similarity index 93% rename from python/understack-workflows/understack_workflows/main/sync_obm_creds.py rename to python/understack-workflows/understack_workflows/main/sync_bmc_creds.py index c296552a..1592ba23 100644 --- a/python/understack-workflows/understack_workflows/main/sync_obm_creds.py +++ b/python/understack-workflows/understack_workflows/main/sync_bmc_creds.py @@ -42,9 +42,9 @@ def main(): ) sys.exit(0) - # Update OBM credentials - expected_username = credential("obm", "username") - expected_password = credential("obm", "password") + # Update BMC credentials + expected_username = credential("bmc", "username") + expected_password = credential("bmc", "password") updates = [ f"driver_info/redfish_username={expected_username}", diff --git a/python/understack-workflows/understack_workflows/models.py b/python/understack-workflows/understack_workflows/models.py index 46bc362f..ac899e50 100644 --- a/python/understack-workflows/understack_workflows/models.py +++ b/python/understack-workflows/understack_workflows/models.py @@ -112,7 +112,7 @@ def check_manufacturer(cls, manufacturer: str) -> None: ) @classmethod - def obm_is_ilo4(cls, chassis_data: SushyChassis) -> bool: + def bmc_is_ilo4(cls, chassis_data: SushyChassis) -> bool: return ( chassis_data.redfish_version == "1.0.0" and chassis_data.manufacturer == "HPE" @@ -126,7 +126,7 @@ def from_redfish(cls, oob_obj: Sushy) -> Chassis: cls.check_manufacturer(chassis_data.manufacturer) - if cls.obm_is_ilo4(chassis_data): + if cls.bmc_is_ilo4(chassis_data): return cls.from_hp_json(oob_obj, chassis_data.name) chassis = cls(chassis_data.name, [], []) diff --git a/workflows/argo-events/docs/sync-nb-server-to-ironic.md b/workflows/argo-events/docs/sync-nb-server-to-ironic.md index 52a72658..7413b952 100644 --- a/workflows/argo-events/docs/sync-nb-server-to-ironic.md +++ b/workflows/argo-events/docs/sync-nb-server-to-ironic.md @@ -10,7 +10,7 @@ We initially wanted to listen on the `dcim.Device` record creation events, but it is more efficient to listen for the updates on the `dcim.Interface` and perform additional checks to see: -- if the updated Interface is an OBM interface +- if the updated Interface is an BMC interface - if the updated Interface's device is a Server (currently we determine this by an interface name, since the Network devices don't have DRAC/iLo cards) ## Caveats diff --git a/workflows/argo-events/docs/sync-srv-redfish-intfs-to-nb.md b/workflows/argo-events/docs/sync-srv-redfish-intfs-to-nb.md index 657bd381..46047e47 100644 --- a/workflows/argo-events/docs/sync-srv-redfish-intfs-to-nb.md +++ b/workflows/argo-events/docs/sync-srv-redfish-intfs-to-nb.md @@ -1,14 +1,14 @@ # Overview -The workflow templates in this folder are designed to create device interfaces in Nautobot based on Redfish information retrieved from devices using OBM credentials. +The workflow templates in this folder are designed to create device interfaces in Nautobot based on Redfish information retrieved from devices using BMC credentials. -The process begins when a sensor detects updates to Nautobot OBM interfaces, prompting the get-obm-creds action to fetch the necessary OBM credentials. This step is crucial as it serves as a prerequisite for the other workflows in this folder. You can find examples of such dependencies in the `deps` folder. +The process begins when a sensor detects updates to Nautobot BMC interfaces, prompting the get-bmc-creds action to fetch the necessary BMC credentials. This step is crucial as it serves as a prerequisite for the other workflows in this folder. You can find examples of such dependencies in the `deps` folder. Following this, the sensor initiates the `sync-interfaces-to-nautobot` workflow. This workflow obtains Redfish information from a server and uses it to create new device interfaces in Nautobot. It is also worth noting that embedded/integrated interfaces are omitted for the purposes of the Undercloud project. -## Servers/OBMs supported +## Servers/BMCs supported The code utilizes the Sushy library to obtain Redfish information. However, to accommodate older versions of Redfish, several workarounds have been implemented within the code. It was successfully tested on: diff --git a/workflows/argo-events/kustomization.yaml b/workflows/argo-events/kustomization.yaml index f2e396da..51f0b044 100644 --- a/workflows/argo-events/kustomization.yaml +++ b/workflows/argo-events/kustomization.yaml @@ -6,11 +6,11 @@ namespace: argo-events resources: - secrets/openstack-svc-acct.yaml - - secrets/obm-creds.yaml - - secrets/placeholder-obm-creds.yaml + - secrets/bmc-creds.yaml + - secrets/placeholder-bmc-creds.yaml - secrets/operate-workflow-sa.token.yaml - secrets/nautobot-token.yaml - - secrets/placeholder-obm-legacy-passwords.yaml + - secrets/placeholder-bmc-legacy-passwords.yaml - sensors/ironic-node-update.yaml - sensors/debug-sensor.yaml - sensors/nb-oob-interface-update.yaml @@ -21,7 +21,7 @@ resources: - workflowtemplates/get-device-nautobot.yaml - workflowtemplates/sync-interfaces-to-nautobot.yaml - workflowtemplates/sync-nb-server-to-ironic.yaml - - workflowtemplates/get-obm-ip.yaml + - workflowtemplates/get-bmc-ip.yaml - workflowtemplates/sync-provision-state-to-nautobot.yaml - workflowtemplates/node-events.yaml - workflowtemplates/sync-interfaces-to-ironic.yaml @@ -29,9 +29,9 @@ resources: - workflowtemplates/sync-server-to-ironic.yaml - workflowtemplates/undersync-switch.yaml - workflowtemplates/keystone-event-project.yaml - - workflowtemplates/get-obm-creds.yaml + - workflowtemplates/get-bmc-creds.yaml - workflowtemplates/idrac-enable-network-boot.yaml - - workflowtemplates/obm-sync-creds.yaml + - workflowtemplates/bmc-sync-creds.yaml - workflowtemplates/sync-srv-redfish-intfs-to-nb.yaml - - workflowtemplates/obm-firmware-update.yaml - - workflowtemplates/sync-obm-creds.yaml + - workflowtemplates/bmc-firmware-update.yaml + - workflowtemplates/sync-bmc-creds.yaml diff --git a/workflows/argo-events/secrets/obm-creds.yaml b/workflows/argo-events/secrets/bmc-creds.yaml similarity index 87% rename from workflows/argo-events/secrets/obm-creds.yaml rename to workflows/argo-events/secrets/bmc-creds.yaml index e5730c39..7b22bd90 100644 --- a/workflows/argo-events/secrets/obm-creds.yaml +++ b/workflows/argo-events/secrets/bmc-creds.yaml @@ -5,5 +5,5 @@ data: password: Y2FsdmluY2FsdmluCg== kind: Secret metadata: - name: obm-creds + name: bmc-creds namespace: argo-events diff --git a/workflows/argo-events/secrets/placeholder-obm-creds.yaml b/workflows/argo-events/secrets/placeholder-bmc-creds.yaml similarity index 60% rename from workflows/argo-events/secrets/placeholder-obm-creds.yaml rename to workflows/argo-events/secrets/placeholder-bmc-creds.yaml index 40a4b95b..ad834460 100644 --- a/workflows/argo-events/secrets/placeholder-obm-creds.yaml +++ b/workflows/argo-events/secrets/placeholder-bmc-creds.yaml @@ -1,4 +1,4 @@ -# The credentials here are the Dell OBM default of root:calvin +# The credentials here are the Dell BMC default of root:calvin apiVersion: v1 data: username: cm9vdA== @@ -6,5 +6,5 @@ data: kind: Secret metadata: creationTimestamp: null - name: placeholder-obm-creds + name: placeholder-bmc-creds namespace: argo-events diff --git a/workflows/argo-events/secrets/placeholder-bmc-legacy-passwords.yaml b/workflows/argo-events/secrets/placeholder-bmc-legacy-passwords.yaml new file mode 100644 index 00000000..98e33a10 --- /dev/null +++ b/workflows/argo-events/secrets/placeholder-bmc-legacy-passwords.yaml @@ -0,0 +1,9 @@ +# This is a placeholder Secret, used by the bmc-sync-creds.yaml WorkflowTemplate, containing the default Dell BMC password of: '["calvin"]' +apiVersion: v1 +data: + passwords: WyJjYWx2aW4iXQ== +kind: Secret +metadata: + creationTimestamp: null + name: placeholder-bmc-legacy-passwords + namespace: argo-events diff --git a/workflows/argo-events/secrets/placeholder-obm-legacy-passwords.yaml b/workflows/argo-events/secrets/placeholder-obm-legacy-passwords.yaml deleted file mode 100644 index 8ffffc40..00000000 --- a/workflows/argo-events/secrets/placeholder-obm-legacy-passwords.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# This is a placeholder Secret, used by the obm-sync-creds.yaml WorkflowTemplate, containing the default Dell OBM password of: '["calvin"]' -apiVersion: v1 -data: - passwords: WyJjYWx2aW4iXQ== -kind: Secret -metadata: - creationTimestamp: null - name: placeholder-obm-legacy-passwords - namespace: argo-events diff --git a/workflows/argo-events/workflowtemplates/obm-firmware-update.yaml b/workflows/argo-events/workflowtemplates/bmc-firmware-update.yaml similarity index 67% rename from workflows/argo-events/workflowtemplates/obm-firmware-update.yaml rename to workflows/argo-events/workflowtemplates/bmc-firmware-update.yaml index a18fd7d2..3d3195ec 100644 --- a/workflows/argo-events/workflowtemplates/obm-firmware-update.yaml +++ b/workflows/argo-events/workflowtemplates/bmc-firmware-update.yaml @@ -1,12 +1,12 @@ apiVersion: argoproj.io/v1alpha1 kind: WorkflowTemplate metadata: - name: obm-firmware-update + name: bmc-firmware-update namespace: argo-events annotations: - workflows.argoproj.io/title: Update OBM firmware on target Device + workflows.argoproj.io/title: Update BMC firmware on target Device workflows.argoproj.io/description: | - Defined in `workflows/argo-events/workflowtemplates/obm-firmware-update.yaml` + Defined in `workflows/argo-events/workflowtemplates/bmc-firmware-update.yaml` spec: serviceAccountName: workflow entrypoint: main @@ -18,51 +18,51 @@ spec: - name: main dag: tasks: - - name: get-obm-ip + - name: get-bmc-ip templateRef: - name: get-obm-ip + name: get-bmc-ip template: main arguments: parameters: - name: device_id value: "{{workflow.parameters.device_id}}" - - name: get-obm-creds + - name: get-bmc-creds templateRef: - name: get-obm-creds + name: get-bmc-creds template: main arguments: parameters: - name: device_id value: "{{workflow.parameters.device_id}}" - name: update-firmware - dependencies: [get-obm-ip, get-obm-creds] - template: obm-firmware-update + dependencies: [get-bmc-ip, get-bmc-creds] + template: bmc-firmware-update arguments: parameters: - name: ip - value: "{{tasks.get-obm-ip.outputs.parameters.ip}}" + value: "{{tasks.get-bmc-ip.outputs.parameters.ip}}" - name: creds - value: "{{tasks.get-obm-creds.outputs.parameters.secret}}" + value: "{{tasks.get-bmc-creds.outputs.parameters.secret}}" - name: firmware_url value: "{{workflow.parameters.firmware-url}}" - - name: obm-firmware-update + - name: bmc-firmware-update inputs: parameters: - name: ip - name: creds - name: firmware_url container: - image: ghcr.io/rackerlabs/understack/argo-obm-utils-python3.11.8:latest + image: ghcr.io/rackerlabs/understack/argo-bmc-utils-python3.11.8:latest command: [python] - args: ["/app/obm_firmware_update.py", "--host", "{{inputs.parameters.ip}}", "--firmware-url", "{{inputs.parameters.firmware_url}}"] + args: ["/app/bmc_firmware_update.py", "--host", "{{inputs.parameters.ip}}", "--firmware-url", "{{inputs.parameters.firmware_url}}"] env: - - name: OBM_USERNAME + - name: BMC_USERNAME valueFrom: secretKeyRef: name: "{{inputs.parameters.creds}}" key: username - - name: OBM_PASSWORD + - name: BMC_PASSWORD valueFrom: secretKeyRef: name: "{{inputs.parameters.creds}}" diff --git a/workflows/argo-events/workflowtemplates/obm-sync-creds.yaml b/workflows/argo-events/workflowtemplates/bmc-sync-creds.yaml similarity index 63% rename from workflows/argo-events/workflowtemplates/obm-sync-creds.yaml rename to workflows/argo-events/workflowtemplates/bmc-sync-creds.yaml index 406f65c9..84c1d6e0 100644 --- a/workflows/argo-events/workflowtemplates/obm-sync-creds.yaml +++ b/workflows/argo-events/workflowtemplates/bmc-sync-creds.yaml @@ -2,12 +2,12 @@ apiVersion: argoproj.io/v1alpha1 kind: WorkflowTemplate metadata: - name: obm-sync-creds + name: bmc-sync-creds namespace: argo-events annotations: - workflows.argoproj.io/title: Sync's a devices OBM password with what we have on record + workflows.argoproj.io/title: Sync's a devices BMC password with what we have on record workflows.argoproj.io/description: | - Defined in `workflows/argo-events/workflowtemplates/obm-sync-creds.yaml` + Defined in `workflows/argo-events/workflowtemplates/bmc-sync-creds.yaml` spec: arguments: parameters: @@ -18,65 +18,65 @@ spec: - name: main dag: tasks: - - name: get-obm-ip + - name: get-bmc-ip templateRef: - name: get-obm-ip + name: get-bmc-ip template: main arguments: parameters: - name: device_id value: "{{workflow.parameters.device_id}}" - - name: get-obm-creds + - name: get-bmc-creds templateRef: - name: get-obm-creds + name: get-bmc-creds template: main arguments: parameters: - name: device_id value: "{{workflow.parameters.device_id}}" - - name: obm-sync-creds - dependencies: [get-obm-ip, get-obm-creds] - template: obm-sync-creds + - name: bmc-sync-creds + dependencies: [get-bmc-ip, get-bmc-creds] + template: bmc-sync-creds arguments: parameters: - name: host - value: "{{tasks.get-obm-ip.outputs.parameters.ip}}" + value: "{{tasks.get-bmc-ip.outputs.parameters.ip}}" - name: target_creds_secret_name - value: "{{tasks.get-obm-creds.outputs.parameters.secret}}" + value: "{{tasks.get-bmc-creds.outputs.parameters.secret}}" - name: idrac-enable-network-boot - dependencies: [get-obm-ip, get-obm-creds] + dependencies: [get-bmc-ip, get-bmc-creds] templateRef: name: idrac-enable-network-boot template: idrac-enable-network-boot arguments: parameters: - name: host - value: "{{tasks.get-obm-ip.outputs.parameters.ip}}" + value: "{{tasks.get-bmc-ip.outputs.parameters.ip}}" - name: target_creds_secret_name - value: "{{tasks.get-obm-creds.outputs.parameters.secret}}" + value: "{{tasks.get-bmc-creds.outputs.parameters.secret}}" - - name: obm-sync-creds + - name: bmc-sync-creds inputs: parameters: - name: host - name: target_creds_secret_name container: - image: ghcr.io/rackerlabs/understack/argo-obm-utils-python3.11.8:latest + image: ghcr.io/rackerlabs/understack/argo-bmc-utils-python3.11.8:latest command: [python] - args: ["/app/obm_sync_creds.py", "--host", "{{ inputs.parameters.host }}"] + args: ["/app/bmc_sync_creds.py", "--host", "{{ inputs.parameters.host }}"] env: - - name: OBM_USERNAME + - name: BMC_USERNAME valueFrom: secretKeyRef: name: "{{inputs.parameters.target_creds_secret_name}}" key: username - - name: OBM_PASSWORD + - name: BMC_PASSWORD valueFrom: secretKeyRef: name: "{{inputs.parameters.target_creds_secret_name}}" key: password - - name: OBM_LEGACY_PASSWORDS + - name: BMC_LEGACY_PASSWORDS valueFrom: secretKeyRef: - name: obm-legacy-passwords + name: bmc-legacy-passwords key: passwords diff --git a/workflows/argo-events/workflowtemplates/get-obm-creds.yaml b/workflows/argo-events/workflowtemplates/get-bmc-creds.yaml similarity index 92% rename from workflows/argo-events/workflowtemplates/get-obm-creds.yaml rename to workflows/argo-events/workflowtemplates/get-bmc-creds.yaml index 444bd8a9..16814c4e 100644 --- a/workflows/argo-events/workflowtemplates/get-obm-creds.yaml +++ b/workflows/argo-events/workflowtemplates/get-bmc-creds.yaml @@ -1,13 +1,13 @@ apiVersion: argoproj.io/v1alpha1 kind: WorkflowTemplate metadata: - name: get-obm-creds + name: get-bmc-creds namespace: argo-events annotations: - workflows.argoproj.io/title: Create a k8s secret containing OBM creds for given device_id + workflows.argoproj.io/title: Create a k8s secret containing BMC creds for given device_id workflows.argoproj.io/description: | - Defined in `workflows/argo-events/workflowtemplates/get-obm-creds.yaml`. - An example template to return the name of a Kubernetes Secret which containing device's OBM credentials. + Defined in `workflows/argo-events/workflowtemplates/get-bmc-creds.yaml`. + An example template to return the name of a Kubernetes Secret which containing device's BMC credentials. spec: # garbage collection on the secret is tied to this pod. we remove this pod only after workflow completion to # allow access to this secret from subsequent workflow/steps. diff --git a/workflows/argo-events/workflowtemplates/get-obm-ip.yaml b/workflows/argo-events/workflowtemplates/get-bmc-ip.yaml similarity index 81% rename from workflows/argo-events/workflowtemplates/get-obm-ip.yaml rename to workflows/argo-events/workflowtemplates/get-bmc-ip.yaml index 2f413716..d6a5d829 100644 --- a/workflows/argo-events/workflowtemplates/get-obm-ip.yaml +++ b/workflows/argo-events/workflowtemplates/get-bmc-ip.yaml @@ -1,13 +1,13 @@ apiVersion: argoproj.io/v1alpha1 kind: WorkflowTemplate metadata: - name: get-obm-ip + name: get-bmc-ip namespace: argo-events annotations: - workflows.argoproj.io/title: Output OBM IP address for the Device with the given device_id + workflows.argoproj.io/title: Output BMC IP address for the Device with the given device_id workflows.argoproj.io/description: | - Defined in `workflows/argo-events/workflowtemplates/get-obm-ip.yaml`. - Get OBM IP address for target Device + Defined in `workflows/argo-events/workflowtemplates/get-bmc-ip.yaml`. + Get BMC IP address for target Device spec: serviceAccountName: workflow entrypoint: main diff --git a/workflows/argo-events/workflowtemplates/idrac-enable-network-boot.yaml b/workflows/argo-events/workflowtemplates/idrac-enable-network-boot.yaml index 89ccb17f..3260e3ec 100644 --- a/workflows/argo-events/workflowtemplates/idrac-enable-network-boot.yaml +++ b/workflows/argo-events/workflowtemplates/idrac-enable-network-boot.yaml @@ -18,31 +18,31 @@ spec: - name: main dag: tasks: - - name: get-obm-ip + - name: get-bmc-ip templateRef: - name: get-obm-ip + name: get-bmc-ip template: main arguments: parameters: - name: device_id value: "{{workflow.parameters.device_id}}" - - name: get-obm-creds + - name: get-bmc-creds templateRef: - name: get-obm-creds + name: get-bmc-creds template: main arguments: parameters: - name: device_id value: "{{workflow.parameters.device_id}}" - name: idrac-enable-network-boot - dependencies: [get-obm-ip, get-obm-creds] + dependencies: [get-bmc-ip, get-bmc-creds] template: idrac-enable-network-boot arguments: parameters: - name: host - value: "{{tasks.get-obm-ip.outputs.parameters.ip}}" + value: "{{tasks.get-bmc-ip.outputs.parameters.ip}}" - name: target_creds_secret_name - value: "{{tasks.get-obm-creds.outputs.parameters.secret}}" + value: "{{tasks.get-bmc-creds.outputs.parameters.secret}}" - name: idrac-enable-network-boot inputs: @@ -50,16 +50,16 @@ spec: - name: host - name: target_creds_secret_name container: - image: ghcr.io/rackerlabs/understack/argo-obm-utils-python3.11.8:latest + image: ghcr.io/rackerlabs/understack/argo-bmc-utils-python3.11.8:latest command: [GetSetBiosAttributesREDFISH.py] - args: ["-ip", "{{ inputs.parameters.host }}", "-u", "$OBM_USERNAME", "-p", "$OBM_PASSWORD", "--attribute-names", "PxeDev1EnDis,PxeDev1Interface,HttpDev1Interface", "--attribute-values", "Enabled,NIC.Slot.1-1,NIC.Slot.1-1", "--reboot"] + args: ["-ip", "{{ inputs.parameters.host }}", "-u", "$BMC_USERNAME", "-p", "$BMC_PASSWORD", "--attribute-names", "PxeDev1EnDis,PxeDev1Interface,HttpDev1Interface", "--attribute-values", "Enabled,NIC.Slot.1-1,NIC.Slot.1-1", "--reboot"] env: - - name: OBM_USERNAME + - name: BMC_USERNAME valueFrom: secretKeyRef: name: "{{inputs.parameters.target_creds_secret_name}}" key: username - - name: OBM_PASSWORD + - name: BMC_PASSWORD valueFrom: secretKeyRef: name: "{{inputs.parameters.target_creds_secret_name}}" diff --git a/workflows/argo-events/workflowtemplates/sync-obm-creds.yaml b/workflows/argo-events/workflowtemplates/sync-bmc-creds.yaml similarity index 67% rename from workflows/argo-events/workflowtemplates/sync-obm-creds.yaml rename to workflows/argo-events/workflowtemplates/sync-bmc-creds.yaml index 8c9eff2f..b5e27648 100644 --- a/workflows/argo-events/workflowtemplates/sync-obm-creds.yaml +++ b/workflows/argo-events/workflowtemplates/sync-bmc-creds.yaml @@ -1,10 +1,10 @@ apiVersion: argoproj.io/v1alpha1 metadata: - name: sync-obm-creds + name: sync-bmc-creds annotations: workflows.argoproj.io/title: Update a Device's BMC (redfish) username/password in Ironic workflows.argoproj.io/description: | - Defined in `workflows/argo-events/workflowtemplates/sync-obm-creds.yaml` + Defined in `workflows/argo-events/workflowtemplates/sync-bmc-creds.yaml` kind: WorkflowTemplate spec: entrypoint: main @@ -15,42 +15,42 @@ spec: templates: - name: main steps: - - - name: load-obm-creds + - - name: load-bmc-creds templateRef: - name: get-obm-creds + name: get-bmc-creds template: main arguments: parameters: - name: device_id value: '{{workflow.parameters.device_id}}' - - - name: sync-obm-creds - template: sync-obm-creds + - - name: sync-bmc-creds + template: sync-bmc-creds arguments: parameters: - - name: obm - value: "{{ steps.load-obm-creds.outputs.parameters.secret }}" + - name: bmc + value: "{{ steps.load-bmc-creds.outputs.parameters.secret }}" - - name: sync-obm-creds + - name: sync-bmc-creds inputs: parameters: - - name: obm + - name: bmc container: image: ghcr.io/rackerlabs/understack/ironic-nautobot-client:latest command: - - sync-obm-creds + - sync-bmc-creds args: - "{{workflow.parameters.interface_update_event}}" volumeMounts: - mountPath: /etc/openstack name: openstack-svc-acct readOnly: true - - mountPath: /etc/obm - name: obm-secret + - mountPath: /etc/bmc + name: bmc-secret readOnly: true volumes: - name: openstack-svc-acct secret: secretName: openstack-svc-acct - - name: obm-secret + - name: bmc-secret secret: - secretName: "{{ inputs.parameters.obm }}" + secretName: "{{ inputs.parameters.bmc }}" diff --git a/workflows/argo-events/workflowtemplates/sync-nb-server-to-ironic.yaml b/workflows/argo-events/workflowtemplates/sync-nb-server-to-ironic.yaml index 6196291b..49ab391d 100644 --- a/workflows/argo-events/workflowtemplates/sync-nb-server-to-ironic.yaml +++ b/workflows/argo-events/workflowtemplates/sync-nb-server-to-ironic.yaml @@ -21,9 +21,9 @@ spec: templateRef: name: sync-server-to-ironic template: sync-server - - - name: sync-server-obm-creds + - - name: sync-server-bmc-creds templateRef: - name: sync-obm-creds + name: sync-bmc-creds template: main - - name: sync-interfaces-to-ironic templateRef: diff --git a/workflows/argo-events/workflowtemplates/sync-srv-redfish-intfs-to-nb.yaml b/workflows/argo-events/workflowtemplates/sync-srv-redfish-intfs-to-nb.yaml index a49dad06..d6ee7990 100644 --- a/workflows/argo-events/workflowtemplates/sync-srv-redfish-intfs-to-nb.yaml +++ b/workflows/argo-events/workflowtemplates/sync-srv-redfish-intfs-to-nb.yaml @@ -15,17 +15,17 @@ spec: templates: - name: main steps: - - - name: sync-obm-creds-to-server + - - name: sync-bmc-creds-to-server templateRef: - name: obm-sync-creds + name: bmc-sync-creds template: main arguments: parameters: - name: device_id value: "{{workflow.parameters.device_id}}" - - - name: get-obm-creds-secret + - - name: get-bmc-creds-secret templateRef: - name: get-obm-creds + name: get-bmc-creds template: main arguments: parameters: @@ -40,4 +40,4 @@ spec: - name: device_id value: "{{workflow.parameters.device_id}}" - name: oob_secret - value: "{{steps.get-obm-creds-secret.outputs.parameters.secret}}" + value: "{{steps.get-bmc-creds-secret.outputs.parameters.secret}}"