Skip to content

Commit

Permalink
Merge remote-tracking branch 'internal/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
jvallexm committed Mar 22, 2024
2 parents e2372fc + 254c2f9 commit 4fed328
Show file tree
Hide file tree
Showing 71 changed files with 8,396 additions and 688 deletions.
12 changes: 12 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
##############################################################################
# .env.example #
##############################################################################
# #
# >> WARNING << #
# #
# Do NOT include quotation marks around values in this file. This will #
# cause the application to crash. #
# #
# #
##############################################################################

API_KEY=<ibm-cloud-platform-API-key>
POWER_WORKSPACE_DAL10=<dal10-powervs-workspace-guid>
POWER_WORKSPACE_DAL12=<dal12-powervs-workspace-guid>
Expand Down
4 changes: 4 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ formatted_print() {
}

# run pretty
formatted_print "Updating Templates"
npm run update-templates
formatted_print "Updating Changelog"
npm run changelog
formatted_print "Prettifying Code"
npm run pretty

Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

All notable changes to this project will be documented in this file.

## 1.13.1

### Upgrade Notes

- A new script `/lib/template-updater.js` has been added to update most unfound fields in CRAIG defined template JSON files
- The CRAIG JSON schema is now configured dynamically using the state store on the `/docs/json` page. Additional fields will now be added automatically
- `.env.example` has been updated to include a warning that included quotation marks in .env values will cause the application to crash
- When fetching VSI Images, the Craig API has no limit on the number of images that can be retrieved. In addition, only available images are retrieved
- Power VS Network interface outputs now use the Terraform field `pi_network_name` instead of the depricated field `name`

### Features

- Terraform code for Power VS Instances and FalconStor VTL instances now have a 3 hour create timeout instead of the default 2 hour timeout
- Power VS Network names and IDs are now included as outputs in CRAIG generated Terraform
- Items highlighted for emphasis in the markdown for CRAIG `CHANGELOG.md` are now also highlighted on the `/docs/releaseNotes` page
- Users can now select a Health Status for Power VS Instances and FalconStor VTL instances
- Power VS SSH Key names are now output in Terraform `outputs.tf` files
- Power VS Workspace locations are now output in Terraform `outputs.tf` files
- Object Storage Bucket names and region locations are now output in Terraform `outputs.tf` files

### Fixes

- Fixed an issue causing FalconStor VTL form in modals to crash

## 1.13.0

### Upgrade Notes
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
FROM node as build
WORKDIR /app
COPY . ./
RUN npm install react-scripts sass cdktf cdktf-cli@latest -g
RUN npm run build

FROM node:alpine
Expand Down
28 changes: 14 additions & 14 deletions ansible/template-test/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
vars:
description: Automated CRAIG Testing Workspace
tags: ["craig"]

- name: TODO - convert to roles
hosts: localhost
vars_files: ./vars/vars.yml
Expand All @@ -39,20 +40,19 @@
until: workspace_status.json.status == "INACTIVE"
delay: 10
retries: 50
- name: Update variablestore
set_fact:
variablestore: "{{ variablestore + [{'name': item, 'secure': true, 'use_default': false, 'value': ssh_key}] }}"
loop: "{{template_map[template]}}"
- name: Update vars in workspace
uri:
url: https://schematics.cloud.ibm.com/v1/workspaces/{{ workspace.json.id }}/template_data/{{ workspace.json.template_data[0].id }}/values
method: PUT
headers:
Authorization: Bearer {{token.json.access_token}}
Content-Type: application/json
body_format: json
body:
variablestore: "{{ variablestore }}"
- name: Update variablestore
hosts: localhost
vars_files: ./vars/vars.yml
roles:
- role: update_variablestore
vars:
# Additional variables can be added to the variablestore by adding elements to the array below.
# Each element must be a map of the following key/value pairs:
# {'name': string, 'secure': bool, 'use_default': bool, 'value': variable_value}
# Note: If using a variable defined in /vars/vars.yml, specify the map using the following syntax:
# {'name': string, 'secure': bool, 'use_default': bool, 'value': "{{variable}}"}
additional_variables: [{'name': ssh_key_public_key, 'secure': true, 'use_default': false, 'value': "{{ssh_key}}"}]
- role: update_workspace_variables
- name: Start generate plan action
hosts: localhost
vars_files: ./vars/vars.yml
Expand Down
38 changes: 38 additions & 0 deletions ansible/template-test/roles/update_variablestore/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Role Name
=========

A brief description of the role goes here.

Requirements
------------

Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.

Role Variables
--------------

A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.

Dependencies
------------

A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
roles:
- { role: username.rolename, x: 42 }

License
-------

BSD

Author Information
------------------

An optional section for the role authors to include contact information, or a website (HTML is not allowed).
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# defaults file for update_variablestore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# handlers file for update_variablestore
52 changes: 52 additions & 0 deletions ansible/template-test/roles/update_variablestore/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
galaxy_info:
author: your name
description: your role description
company: your company (optional)

# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker

# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)

min_ansible_version: 2.1

# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:

#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99

galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.

dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# tasks file for update_variablestore
- name: Add variable to variable store
set_fact:
variablestore: "{{ variablestore + additional_variables }}"
loop: "{{template_map[template]}}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
localhost

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- update_variablestore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# vars file for update_variablestore
38 changes: 38 additions & 0 deletions ansible/template-test/roles/update_workspace_variables/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Role Name
=========

A brief description of the role goes here.

Requirements
------------

Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.

Role Variables
--------------

A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.

Dependencies
------------

A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
roles:
- { role: username.rolename, x: 42 }

License
-------

BSD

Author Information
------------------

An optional section for the role authors to include contact information, or a website (HTML is not allowed).
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# defaults file for update_vars_in_workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# handlers file for update_vars_in_workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
galaxy_info:
author: your name
description: your role description
company: your company (optional)

# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker

# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)

min_ansible_version: 2.1

# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:

#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99

galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.

dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# tasks file for update_workspace_variables
- name: Update Workspace Variables
uri:
url: https://schematics.cloud.ibm.com/v1/workspaces/{{ workspace.json.id }}/template_data/{{ workspace.json.template_data[0].id }}/values
method: PUT
headers:
Authorization: Bearer {{token.json.access_token}}
Content-Type: application/json
body_format: json
body:
variablestore: "{{ variablestore }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
localhost

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- update_vars_in_workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
# vars file for update_vars_in_workspace
8 changes: 4 additions & 4 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions client/src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,12 @@ div .sgFormTopMargin {
color: #da1e28;
}

.spanPadding {
padding: 0.2rem;
font-size: 85%;
font-weight: bold;
}

.serviceOpen {
color: #0f62fe;
box-shadow: 0 10px 14px 0 rgba(0, 0, 0, 0.24),
Expand Down
Loading

0 comments on commit 4fed328

Please sign in to comment.