-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AMW-103 Devfile for Ansible Middleware
- Loading branch information
1 parent
8e22a47
commit 71b7eeb
Showing
3 changed files
with
67 additions
and
4 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,31 @@ | ||
# wildfly-cluster-demo | ||
|
||
A demo to setup a simple Wildfly (or EAP) cluster using the Ansible Wildfly collection. | ||
|
||
## How to use devfile to setup your dev environment | ||
|
||
To use the `devfile.yaml` and set up your development environment with OpenShift Dev Spaces or Visual Studio Code, follow these steps: | ||
|
||
1. **Clone the Repository** | ||
|
||
```sh | ||
git clone https://github.com/ansible-middleware/wildfly-cluster-demo.git | ||
cd wildfly-cluster-demo | ||
``` | ||
2. **Install OpenShift Dev Spaces or Visual Studio Code** | ||
|
||
- Download and install [OpenShift Dev Spaces](https://access.redhat.com/products/red-hat-openshift-dev-spaces), else you can directly use Dev Spaces from [Red Hat Developer Snadbox](https://console.redhat.com/openshift/sandbox) as well. | ||
- Download and install [Visual Studio Code](https://code.visualstudio.com/). | ||
|
||
3. 1. **Open the Red Hat Dev Spaces(If you Red Hat subscription use this)** | ||
|
||
- Select `Red Hat Dev Spaces` option from above provided Red hat Developer Sandbox link. | ||
- Put [wildfly-cluster-demo](https://github.com/ansible-middleware/wildfly-cluster-demo.git) Git repo URL in the `Import from Git` option and click on `Create & Open`. | ||
|
||
2. **Open the Project in Visual Studio Code** | ||
|
||
- Open Visual Studio Code. | ||
- Open the project folder you cloned: `File > Open Folder...` and select the project directory. | ||
- Once the folder is open, click on the green button in the bottom-left corner (`><`) and select `New Dev Container`. | ||
Both options will use the `devfile.yaml` to configure and start the development container. You can then start coding and run the playbook within this environment, without worrying about the prerequisite setup. |
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,36 @@ | ||
schemaVersion: 2.1.0 | ||
|
||
metadata: | ||
name: wildfly-demo | ||
attributes: | ||
controller.devfile.io/storage-type: ephemeral | ||
|
||
projects: | ||
- name: wildfly-cluster-demo | ||
git: | ||
remotes: | ||
origin: "https://github.com/ansible-middleware/wildfly-cluster-demo.git" | ||
|
||
components: | ||
- name: tooling-container | ||
container: | ||
image: ghcr.io/ansible/ansible-workspace-env-reference:v24.6.3 | ||
memoryRequest: 256M | ||
memoryLimit: 6Gi | ||
cpuRequest: 250m | ||
cpuLimit: 2000m | ||
args: ['tail', '-f', '/dev/null'] | ||
env: | ||
- name: 'ANSIBLE_COLLECTIONS_PATH' | ||
value: '~/.ansible/collections:/usr/share/ansible/collections:/projects/ansible-devspaces-demo/collections' | ||
|
||
commands: | ||
- id: install-requirements | ||
exec: | ||
component: tooling-container | ||
commandLine: "ansible-galaxy install -r molecule/default/requirements.yml" | ||
workingDir: "${PROJECTS_ROOT}/wildfly-cluster-demo" | ||
label: Install required collections. | ||
events: | ||
postStart: | ||
- "install-requirements" |