Skip to content

Commit

Permalink
Merge pull request #13 from p3ck/rhdh_templates
Browse files Browse the repository at this point in the history
Include RHDH templates
  • Loading branch information
p3ck authored Dec 4, 2024
2 parents 4bf0df2 + dba699c commit c58c7a5
Show file tree
Hide file tree
Showing 2 changed files with 199 additions and 0 deletions.
105 changes: 105 additions & 0 deletions extensions/patterns/create_iis/template_rhdh/create_iis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: windows-operations-create-iis
title: Create a Windows web server
description: >-
This wizard will guide you on how to create an IIS web server in the Windows
operating system
namespace: default
tags:
- aap-operations
- intermediate
- windows
spec:
type: service
parameters:
- title: Prompts
description: Create an IIS web server in the Windows operating system
required:
- token
- inventory
- credentials
properties:
token:
title: Token
type: string
description: Oauth2 token
ui:field: AAPTokenField
ui:widget: password
ui:backstage:
review:
show: false
inventory:
title: Inventory
description: Please enter the inventory you want to use the services on
resource: inventories
ui:field: AAPResourcePicker
credentials:
title: Credentials
description: >-
Select credentials for accessing the nodes this job will be ran
against. You can only select one credential of each type. For
machine credentials (SSH), checking "Prompt on launch" without
selecting credentials will require you to select a machine
credential at run time. If you select credentials and check "Prompt
on launch", the selected credential(s) become the defaults that can
be updated at run time.
type: array
ui:field: AAPResourcePicker
resource: credentials
- title: Survey
required:
- iisName
- iisPath
- iisPort
description: Create an IIS web server in the Windows operating system
properties:
iisName:
title: Server Name
type: string
description: Name of the IIS Web Server
ui:options:
rows: 5
iisPath:
title: Server Path
type: string
description: Path to the root directory of the IIS Web Server
ui:options:
rows: 5
iisPort:
title: Server Port
type: number
description: Network port to listen on
default: 80
iisTestMessage:
title: Test Message
type: string
description: Test Message to place in index.html
default: Test Message to place in index.html
ui:options:
rows: 5
steps:
- id: launch-job
name: Launch Windows Operations / Create IIS
action: rhaap:launch-job-template
input:
token: ${{ parameters.token }}
values:
templateID: null
inventory: ${{ parameters.inventory }}
credentials: ${{ parameters.credentials }}
extraVariables:
iis_name: ${{ parameters.iisName }}
iis_path: ${{ parameters.iisPath }}
iis_port: ${{ parameters.iisPort }}
iis_test_message: ${{ parameters.iisTestMessage }}
output:
text:
- title: Windows Operations / Create IIS template executed successfully
content: |
**Job ID:** ${{ steps['launch-job'].output.data.id }}
**Job STATUS:** ${{ steps['launch-job'].output.data.status }}
links:
- title: View in RH AAP
url: ${{ steps['launch-job'].output.data.url }}
94 changes: 94 additions & 0 deletions extensions/patterns/delete_iis/template_rhdh/delete_iis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: windows-operations-delete-iis
title: Delete a Windows web server
description: >-
This wizard will guide you on how to delete an IIS web server in the Windows
operating system
namespace: default
tags:
- aap-operations
- intermediate
- windows
spec:
type: service
parameters:
- title: Prompts
description: Delete an IIS web server in the Windows operating system
required:
- token
- inventory
- credentials
properties:
token:
title: Token
type: string
description: Oauth2 token
ui:field: AAPTokenField
ui:widget: password
ui:backstage:
review:
show: false
inventory:
title: Inventory
description: Please enter the inventory you want to use the services on
resource: inventories
ui:field: AAPResourcePicker
credentials:
title: Credentials
description: >-
Select credentials for accessing the nodes this job will be ran
against. You can only select one credential of each type. For
machine credentials (SSH), checking "Prompt on launch" without
selecting credentials will require you to select a machine
credential at run time. If you select credentials and check "Prompt
on launch", the selected credential(s) become the defaults that can
be updated at run time.
type: array
ui:field: AAPResourcePicker
resource: credentials
- title: Survey
required:
- iisName
- iisRemove
description: Delete an IIS web server in the Windows operating system
properties:
iisName:
title: Server Name
type: string
description: Name of the IIS Web Server
ui:options:
rows: 5
iisRemove:
title: Remove Feature IIS
description: >-
Select all to remove the IIS Service as well as the Web Server
definition
type: string
enum:
- all
- server
default: server
steps:
- id: launch-job
name: Launch Windows Operations / Delete IIS
action: rhaap:launch-job-template
input:
token: ${{ parameters.token }}
values:
templateID: null
inventory: ${{ parameters.inventory }}
credentials: ${{ parameters.credentials }}
extraVariables:
iis_name: ${{ parameters.iisName }}
iis_remove_all: ${{ parameters.iisRemove }}
output:
text:
- title: Windows Operations / Delete IIS template executed successfully
content: |
**Job ID:** ${{ steps['launch-job'].output.data.id }}
**Job STATUS:** ${{ steps['launch-job'].output.data.status }}
links:
- title: View in RH AAP
url: ${{ steps['launch-job'].output.data.url }}

0 comments on commit c58c7a5

Please sign in to comment.