-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This experience is for deploying Windows IIS Server. Include the execution environment to run against and how to build it manually for now.
- Loading branch information
Showing
14 changed files
with
236 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
context/** |
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,8 @@ | ||
Build EE manually, push to quay.io | ||
|
||
``` | ||
ansible-builder build | ||
# podman build -f context/Containerfile -t ansible-execution-env:latest context | ||
podman tag ansible-execution-env:latest quay.io/p3ck/apd-ee-25-experience:latest | ||
podman push quay.io/p3ck/apd-ee-25-experience:latest | ||
``` |
13 changes: 13 additions & 0 deletions
13
extensions/experiences/create_iis/exec_env/execution_environment.yml
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,13 @@ | ||
--- | ||
version: 3 | ||
images: | ||
base_image: | ||
name: quay.io/ansible-product-demos/apd-ee-25:latest | ||
dependencies: | ||
galaxy: requirements.yml | ||
ansible_core: | ||
package_pip: ansible-core | ||
ansible_runner: | ||
package_pip: ansible-runner | ||
system: | ||
- podman |
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,6 @@ | ||
--- | ||
collections: | ||
# - name: ansible.experience_demo | ||
- name: https://github.com/p3ck/infra.windows_ops.git | ||
type: git | ||
version: feature-service-aae |
22 changes: 22 additions & 0 deletions
22
extensions/experiences/create_iis/playbooks/run_create_iis.yml
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,22 @@ | ||
--- | ||
- name: Create IIS Server Play | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Create default test message if not provided | ||
ansible.builtin.set_fact: | ||
test_message: "Welcome to IIS Web Server" | ||
when: iis_test_message is not defined | ||
|
||
- name: Set Default vars | ||
ansible.builtin.set_fact: | ||
test_message_final: "{{ iis_test_message | default(test_message) }}" | ||
|
||
- name: Create IIS Server | ||
ansible.builtin.include_role: | ||
name: infra.windows_ops.windows_manage_iis | ||
vars: | ||
windows_manage_iis_name: "{{ iis_name }}" # Set by survey | ||
windows_manage_iis_path: "{{ iis_path }}" # Set by survey | ||
windows_manage_iis_port: "{{ iis_port }}" # Set by survey | ||
windows_manage_iis_test_message: "{{ test_message_final }}" # Use conditional message |
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,49 @@ | ||
--- | ||
# Labels | ||
# | ||
controller_labels: | ||
- name: infra.windows_ops | ||
organization: "{{ organization | default('Default') }}" | ||
- name: create_iis | ||
organization: "{{ organization | default('Default') }}" | ||
- name: run_create_iis | ||
organization: "{{ organization | default('Default') }}" | ||
|
||
# Execution Environments | ||
# | ||
controller_execution_environments: | ||
# - name: apd-ee-25 | ||
# description: apd-ee-25 | ||
# image: quay.io/ansible-product-demos/apd-ee-25 | ||
# pull: always | ||
- name: apd-ee-25-rhel | ||
description: Allow running RHEL experience demo. Based on apd-ee-25. | ||
image: quay.io/p3ck/apd-ee-25-experience:latest | ||
pull: always | ||
|
||
# Projects | ||
# | ||
controller_projects: | ||
- name: Windows Operations / Project | ||
organization: Default | ||
scm_branch: main | ||
scm_clean: 'no' | ||
scm_delete_on_update: 'no' | ||
scm_type: git | ||
scm_update_on_launch: 'no' | ||
scm_url: https://github.com/redhat-cop/infra.windows_ops.git | ||
|
||
|
||
# Job Templates | ||
# | ||
controller_templates: | ||
- name: Windows Operations / Create IIS | ||
ask_inventory_on_launch: true | ||
labels: | ||
- infra.windows_ops | ||
- create_iis | ||
- run_create_iis | ||
playbook: extensions/experiences/create_iis/playbooks/run_create_iis.yml | ||
project: Windows Ops PLaybooks Project | ||
survey_enabled: true | ||
survey_spec: "{{ lookup('file', experience.path.replace('setup.yml', '') + 'template_surveys/create_iis.yaml') | from_yaml }}" |
29 changes: 29 additions & 0 deletions
29
extensions/experiences/create_iis/template_surveys/create_iis.yml
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,29 @@ | ||
--- | ||
name: "Create IIS Configuration Survey" | ||
description: "Survey to configure create IIS options" | ||
spec: | ||
- type: "text" | ||
question_name: "Server Name" | ||
question_description: "Name of the IIS Web Server" | ||
variable: "iis_name" | ||
required: true | ||
|
||
- type: "text" | ||
question_name: "Server Path" | ||
question_description: "Path to the root directory of the IIS Web Server" | ||
variable: "iis_path" | ||
required: true | ||
|
||
- type: "integer" | ||
question_name: "Server Port" | ||
question_description: "Network port to listen on" | ||
variable: "iis_port" | ||
required: true | ||
default: "80" | ||
|
||
- type: "text" | ||
question_name: "Test Message" | ||
question_description: "Test Message to place in index.html" | ||
variable: "iis_test_message" | ||
required: false | ||
default: "Welcome to IIS Web Server" |
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 @@ | ||
context/** |
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,8 @@ | ||
Build EE manually, push to quay.io | ||
|
||
``` | ||
ansible-builder build | ||
# podman build -f context/Containerfile -t ansible-execution-env:latest context | ||
podman tag ansible-execution-env:latest quay.io/p3ck/apd-ee-25-experience:latest | ||
podman push quay.io/p3ck/apd-ee-25-experience:latest | ||
``` |
13 changes: 13 additions & 0 deletions
13
extensions/experiences/delete_iis/exec_env/execution_environment.yml
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,13 @@ | ||
--- | ||
version: 3 | ||
images: | ||
base_image: | ||
name: quay.io/ansible-product-demos/apd-ee-25:latest | ||
dependencies: | ||
galaxy: requirements.yml | ||
ansible_core: | ||
package_pip: ansible-core | ||
ansible_runner: | ||
package_pip: ansible-runner | ||
system: | ||
- podman |
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,6 @@ | ||
--- | ||
collections: | ||
# - name: ansible.experience_demo | ||
- name: https://github.com/p3ck/infra.windows_ops.git | ||
type: git | ||
version: feature-service-aae |
12 changes: 12 additions & 0 deletions
12
extensions/experiences/delete_iis/playbooks/run_delete_iis.yml
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,12 @@ | ||
--- | ||
- name: Delete IIS Server Play | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Delete IIS Server | ||
ansible.builtin.include_role: | ||
name: infra.windows_ops.windows_manage_iis | ||
vars: | ||
windows_manage_iis_name: "{{ iis_name }}" # Set by survey | ||
windows_manage_iis_delete_option: "{{ iis_remove_all }}" # Set by survey | ||
windows_manage_iis_operation: "delete" |
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,49 @@ | ||
--- | ||
# Labels | ||
# | ||
controller_labels: | ||
- name: infra.windows_ops | ||
organization: "{{ organization | default('Default') }}" | ||
- name: delete_iis | ||
organization: "{{ organization | default('Default') }}" | ||
- name: run_delete_iis | ||
organization: "{{ organization | default('Default') }}" | ||
|
||
# Execution Environments | ||
# | ||
controller_execution_environments: | ||
# - name: apd-ee-25 | ||
# description: apd-ee-25 | ||
# image: quay.io/ansible-product-demos/apd-ee-25 | ||
# pull: always | ||
- name: apd-ee-25-rhel | ||
description: Allow running RHEL experience demo. Based on apd-ee-25. | ||
image: quay.io/p3ck/apd-ee-25-experience:latest | ||
pull: always | ||
|
||
# Projects | ||
# | ||
controller_projects: | ||
- name: Windows Operations / Project | ||
organization: Default | ||
scm_branch: main | ||
scm_clean: 'no' | ||
scm_delete_on_update: 'no' | ||
scm_type: git | ||
scm_update_on_launch: 'no' | ||
scm_url: https://github.com/redhat-cop/infra.windows_ops.git | ||
|
||
|
||
# Job Templates | ||
# | ||
controller_templates: | ||
- name: Windows Operations / Delete IIS | ||
ask_inventory_on_launch: true | ||
labels: | ||
- infra.windows_ops | ||
- delete_iis | ||
- run_delete_iis | ||
playbook: extensions/experiences/create_iis/playbooks/run_delete_iis.yml | ||
project: Windows Ops PLaybooks Project | ||
survey_enabled: true | ||
survey_spec: "{{ lookup('file', experience.path.replace('setup.yml', '') + 'template_surveys/delete_iis.yaml') | from_yaml }}" |
19 changes: 19 additions & 0 deletions
19
extensions/experiences/delete_iis/template_surveys/delete_iis.yml
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,19 @@ | ||
--- | ||
name: "Delete IIS Configuration Survey" | ||
description: "Survey to configure delete IIS options" | ||
spec: | ||
- type: "text" | ||
question_name: "Server Name" | ||
question_description: "Name of the IIS Web Server" | ||
variable: "iis_name" | ||
required: true | ||
|
||
- type: "multiplechoice" | ||
question_name: "Remove Feature IIS" | ||
question_description: "Select all to remove the IIS Service as well as the Web Server definition" | ||
choices: | ||
- "all" | ||
- "server" | ||
variable: "iis_remove_all" | ||
default: "server" | ||
required: false |