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 15, 2024
2 parents 7e5299f + c3b6c33 commit e2372fc
Show file tree
Hide file tree
Showing 131 changed files with 4,261 additions and 728 deletions.
8 changes: 7 additions & 1 deletion .docs/craig-code-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ If you do not want Power VS workspaces created in every zone, you can create the
#### generate-env.sh prerequisites
- [jq](https://jqlang.github.io/jq/) v1.7 or higher
- ibmcloud CLI
- Bash version 4 or higher

#### Downloading generate-env.sh in IBM Cloud Shell
From within IBM Cloud Shell run the following two commands to download the script and make it executable:
```bash
wget https://raw.githubusercontent.com/IBM/CRAIG/main/generate-env.sh
chmod 755 generate-env.sh
```

To generate an env containing all of the workspaces in your account, you can run the following command:

Expand Down
33 changes: 33 additions & 0 deletions .docs/poc-template-worksheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Worksheet for Power VS POC template

Set up access policies in your IBM Cloud account following the instructions [here](access-policies.md) <br>

Create in your IBM cloud account:<br>
- API key

## Record the values for the keys mentioned below:

### On-Premises information

| *Keys* | *Values* |
| ------------------------------------------------------------------------------------------- | -------- |
| [*On-Prem network CIDRs](powervs-poc.md#on-premises-network-cidrs-and-peer-address) | |
| [*On-Prem Peer Address](powervs-poc.md#on-premises-network-cidrs-and-peer-address) | |
| [*On-Prem connection preshared key](powervs-poc.md#configuring-the-on-premises-vpn-gateway) | |

### IBM Cloud information

| *Keys* | *Values* |
| -------------------------------------------------------------------------------------------------------------- | -------- |
| [Region](powervs-poc.md#region-and-power-vs-zone) | |
| [Power VS Zone](powervs-poc.md#region-and-power-vs-zone) | |
| [resource name prefix](powervs-poc.md#resource-prefix) (optional) | |
| [*Public SSH key](powervs-poc.md#set-public-ssh-keys) | |
| [*IBM Cloud API Key](https://cloud.ibm.com/docs/account?topic=account-userapikey&interface=ui#create_user_key) | |
| [VPC VPN network CIDR](powervs-poc.md#vpc-network-cidr) | |
| [VPC VSI network CIDR](powervs-poc.md#vpc-network-cidr) | |
| [VPC VPE network CIDR](powervs-poc.md#vpc-network-cidr) | |
| [Power VS network CIDR](powervs-poc.md#power-virtual-server-network-cidr) | |


*Note*: The asterisk (*) denotes mandatory fields; optional values can be provided, otherwise CRAIG will default to predefined values.
1 change: 0 additions & 1 deletion .docs/power-vs-workspace-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ If you do not want Power VS workspaces created in every zone or if you want to u
#### generate-env.sh prerequisites
- [jq](https://jqlang.github.io/jq/) v1.7 or higher
- [IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-getting-started)
- Bash version 4 or higher

To generate a `.env` file containing all of the workspaces in your account, you can run the following command:

Expand Down
2 changes: 1 addition & 1 deletion .docs/powervs-poc.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ After changing the region and zone(s) in the options, the existing Power VS work
The default AIX and IBM i virtual servers in the template will also need to be updated with the newly selected images. Click on each of the red Virtual Server icons, set their image, and click the save button for the VSI.

### VPC network CIDR
To change CIDR of the VPC networks, click on `VPC Networks` on the left navigation bar. Click on the the network you would like to update, change the "Advanced Configuration" to true, de-select zones 2 and 3 from the Zones seletor and press the Save button.
To change CIDR of the VPC networks, click on `VPC Networks` on the left navigation bar. Click on the the network you would like to update, change the "Advanced Configuration" to true, de-select zones 2 and 3 from the Zones selector and press the Save button.

Finally, change the subnet CIDR and click the Save button next to the subnet name.

Expand Down
2 changes: 1 addition & 1 deletion .docs/schematics-how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ The `API_KEY` variable must be set in the `.env`. If CRAIG is deployed in IBM Co

### Access Policy
In order to allow Schematics integration, users should make sure they have the following access policy roles for the Schematics service:
>* `Editor` or greater Platform access
>* `Writer` or greater Service access
>* `Editor` or greater Platform access
These roles allow the integration with Schematics including the Schematics workspace creation and the upload of the project. However, to create and manage the IBM Cloud resources in the template, you must be assigned the IAM platform or service access role for the individual IBM Cloud resources that are in the template. See the IBM Cloud documentation for the various services for specific roles required.

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

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

## 1.13.0

### Upgrade Notes

- A new, improved version of the CRAIG tutorial is available in the README. This tutorial shows users how to install CRAIG, use the new V2 GUI, and integrate deployments with schematics
- Deprecated field for VSI primary IPs has been change to a version that no longer throws Terraform warnings

### Features

- Users will now get feedback when a Power VS Workspace has no VTL images when trying to create or update a VTL instance. Images can be added from the Power VS Workspace form
- Icons for deployments within imported subnets are now rendered within that subnet on the `/v2/vpcDeployments` page
- Users can now create Classic VSI from the form page `/form/classicVsi`
- Power VS Workspace names, ids, and CRNs are now included as outputs in the `outputs.tf` file of any CRAIG Terraform template
- Power VS High Availability is now supported for `mad02`, `mad04`, `us-east`, `wdc06`, `us-south`, `eu-de-1`, and `eu-de-2`
- When updating a Power VS Instance name, references to that instance are now updated to match the new name
- Users can now upload JSON directly to CRAIG from the local file explorer from the Projects page by clicking the new `Upload JSON` button
- Users can now create Classic Bare Metal Servers from the form page `/form/classicBareMetal`
- Power VS Instance Primary IP addresses are now included as outputs in the `outputs.tf` file of any CRAIG Terraform template
- When downloading a `.zip` file of an environment from the CRAIG GUI, an image of the current environment is now included in the archive
- CRAIG now supports adding a Pin Policy to Power VS instances

### Fixes

- Fixed an issue with button hoverText alignment causing overflow in forms
- Fixed an issue causing an incorrect name for DNS Services in the `/v2/services` page
- Fixed an issue preventing users from inputing decimal values for CPU when creating a FalconStor VTL instance with a shared processor type

## 1.12.2

### Upgrade Notes
Expand Down
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
email.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributing

Found a bug or need an additional feature? File an issue in this repository with the following information and they will be responded to in a timely manner.

## Bugs

- A detailed title describing the issue with the current release and the tag `[BUG]`. For sprint one, filing a bug would have the title `[0.1.0][BUG] <issue title>`
- Steps to recreate said bug (including non-sensitive variables)
- (optional) Corresponding output logs **as text or as part of a code block**
- Tag bug issues with the `bug` label
- If you come across a vulnerability that needs to be addressed immediately, use the `vulnerability` label


## Features

- A detailed title describing the desired feature that includes the current release. For sprint one, a feature would have the title `[0.1.0] <feature name>`
- A detailed description including the user story
- A checkbox list of needed features
- Tag the issue with the `enhancement` label

Want to work on an issue? Be sure to assign it to yourself and branch from main. When you're done making the required changes, create a pull request.

## Pull requests

**Do not merge directly to main**. Pull requests should reference the corresponding issue filed in this repository. Please be sure to maintain **code coverage** before merging.

At least **two** reviews are required to merge a pull request. When creating a pull request, please ensure that details about unexpected changes to the codebase are provided in the description.

37 changes: 24 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ CRAIG configures infrastructure using JSON to create full VPC networks, manage s

---

### Tutorial Video

[Follow this tutorial](https://ibm.box.com/v/craigTutorialVideo) for step-by-step instructions on how to get started with CRAIG.

***Ensure `Quality: 1080p` is selected within Box video player settings for the best viewing experience.***

***Last Updated: March 11th, 2024***

---

## Installation

1. [Running CRAIG Application Locally](#running-craig-application-locally)
Expand All @@ -27,14 +37,6 @@ CRAIG configures infrastructure using JSON to create full VPC networks, manage s

---

### Tutorial Video

[Follow this tutorial](https://ibm.box.com/v/craigTutorialVideo) for step-by-step instructions on how to get started with CRAIG.

***Ensure `Quality: 1080p` is selected within Box video player settings for the best viewing experience.***

---

### Running CRAIG Application Locally

To get started using CRAIG locally, follow these steps:
Expand Down Expand Up @@ -74,12 +76,12 @@ Within the root directory is a script `deploy.sh` which deploys CRAIG to IBM Clo

Users should make sure they have the following access policy roles for the IBM Code Engine service set within their IBM Cloud Account:

- IBM Cloud Platform Roles: Editor or Higher
- Code Engine Service Roles: Writer or Higher
>* `Writer` or greater Service access
>* `Editor` or greater Platform access
Users should also make sure they have the following access policy roles for the IBM Cloud Container Registry service set within their IBM Cloud Account:

- Container Registry Service: Manager
>* `Manager` Service access
These permissions are the minimum requirements needed in order to provision a Code Engine project, Container Registry namespace, application, image build, and secrets using the `deploy.sh` script.

Expand Down Expand Up @@ -108,7 +110,14 @@ chmod 755 deploy.sh

By default the script will securely prompt you for your API key. It may also be read from an environment variable or specified as a command line argument. See the `deploy.sh -h` usage for more information.

If CRAIG is used for Power VS configuration, Power VS workspaces must exist in the zones that CRAIG projects will use. The deploy script can create the Power Virtual Server workspaces in every Power VS zone worldwide and automatically integrate them with the CRAIG deployment. The deploy script uses a Schematics workspace and Terraform to drive the creation and deletion of the Power Virtual Server workspaces. Specify the `-z` parameter to automatically create the Power Virtual Server workspaces:
If CRAIG is used for Power VS configuration, Power Virtual Server workspaces must exist in the zones that CRAIG projects will use. The deploy script can create the Power Virtual Server workspaces in every Power VS zone worldwide and automatically integrate them with the CRAIG deployment.

The deploy script uses a Schematics workspace and Terraform to drive the creation and deletion of the Power Virtual Server workspaces. In order to allow Schematics integration, users should make sure they have the following access policy roles for the Schematics service set within their IBM Cloud Account:

>* `Writer` or greater Service access
>* `Editor` or greater Platform access
Once access policy roles for the Schematics service are properly configured, users can specify the `-z` parameter to automatically create the Power Virtual Server workspaces alongside your CRAIG deployment:

```bash
./deploy.sh -z
Expand Down Expand Up @@ -161,9 +170,11 @@ Make sure to set the `API_KEY` variable in a `.env` file to be used for IBM Clou
See `.env.example` found [here](./.env.example)

```shell
docker run -it --env-file .env -- craig
docker run -t -d -p 8080:8080 --env-file .env -- craig
```

CRAIG is now available at http://localhost:8080.

---

### Setting Up CRAIG Development Environment
Expand Down
12 changes: 12 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Security Policy

## Supported Versions

| Version | Supported |
| ---------- | ------------------- |
| > 1.10.x | :white_check_mark: |
| < 1.10.0 | :x: |

## Reporting a Vulnerability

- Create a GitHub issue and use the `vulnerability` label

0 comments on commit e2372fc

Please sign in to comment.