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 Jun 10, 2024
2 parents ff1eb85 + f8f9d2c commit 9168442
Show file tree
Hide file tree
Showing 29 changed files with 319 additions and 213 deletions.
2 changes: 1 addition & 1 deletion .docs/powervs-poc.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Set the VPN Server values using the following table as a guide.
| Authentication method | Username and Certificate |
| Certificate CRN | The CRN of the Secrets Manager secret containing the certificate for the VPN Server. |
| Client CA CRN | The CRN of the Secrets Manager secret containing the certificate for the VPN client. |
| Client CIDR Pool | Specify a network CIDR that does not conflict with any on-premises network, the VPC network, or the Power VS network. The CIDR should also be a subnet of 10.0.0.0/8 to avoid additional security group changes. |
| Client CIDR Pool | Specify a network CIDR that does not conflict with any on-premises network, the VPC network, or the Power VS network. The prefix length must be between 9 and 22 inclusive. The CIDR should also be a subnet of `10.0.0.0/8` to avoid additional security group and routing table changes. For example `10.60.0.0/22` does not conflict with the default VPC, Power VS, or on-premises networks in the template. |
| Port | 443 |
| Protocol | UDP |
| Enable split tunneling | True is recommended |
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

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

## 1.16.1

### Upgrade Notes

- When creating a GRE Tunnel a Remote Gateway IP and Local Gateway IP must be entered in the GRE Tunnel Form to allow for Terraform to be generated successfully

### Features

- Added documentation for Power VS Shared Processor Pools and Power VS Placement Groups

## 1.16.0

### Features
Expand Down
4 changes: 2 additions & 2 deletions client/package-lock.json

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

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "craig",
"version": "1.16.0",
"version": "1.16.1",
"private": true,
"license": "Apache-2.0",
"scripts": {
Expand Down
13 changes: 1 addition & 12 deletions client/src/components/forms/dynamic-form/SubFormOverrideTile.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
import React from "react";
import PropTypes from "prop-types";
import {
ClassicDisabledTile,
CraigEmptyResourceTile,
NoClassicGatewaysTile,
NoDomainsTile,
} from "./tiles";
import { CraigEmptyResourceTile, NoDomainsTile } from "./tiles";

export const SubFormOverrideTile = (props) => {
let jsonField = props.subForm.jsonField;
return jsonField === "dns_records" &&
props.componentProps.data.domains.length === 0 ? (
<NoDomainsTile />
) : jsonField === "gre_tunnels" &&
!props.componentProps.craig.store.json._options.enable_classic ? (
ClassicDisabledTile(true)
) : jsonField === "gre_tunnels" &&
props.componentProps.craig.store.json.classic_gateways.length === 0 ? (
<NoClassicGatewaysTile />
) : (
// have to pass in tile here otherwise will not render
<CraigEmptyResourceTile
Expand Down
15 changes: 7 additions & 8 deletions client/src/components/pages/CraigForms.js
Original file line number Diff line number Diff line change
Expand Up @@ -1432,17 +1432,10 @@ function craigForms(craig) {
name: "GRE Tunnels",
addText: "Create a GRE Tunnel",
jsonField: "gre_tunnels",
toggleFormFieldName: "gateway",
hideFormTitleButton: function (stateData, componentProps) {
return (
!componentProps.craig.store.json._options.enable_classic ||
componentProps.craig.store.json.classic_gateways.length === 0
);
},
form: {
groups: [
{
gateway: craig.transit_gateways.gre_tunnels.gateway,
name: craig.transit_gateways.gre_tunnels.name,
zone: craig.transit_gateways.gre_tunnels.zone,
},
{
Expand All @@ -1451,6 +1444,12 @@ function craigForms(craig) {
remote_tunnel_ip:
craig.transit_gateways.gre_tunnels.remote_tunnel_ip,
},
{
local_gateway_ip:
craig.transit_gateways.gre_tunnels.local_gateway_ip,
remote_gateway_ip:
craig.transit_gateways.gre_tunnels.remote_gateway_ip,
},
{
remote_bgp_asn:
craig.transit_gateways.gre_tunnels.remote_bgp_asn,
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/pages/diagrams/TransitGatewaysMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ export const TransitGatewaysMap = (props) => {
>
{tgw.gre_tunnels.map((tunnel, tunnelIndex) => (
<DeploymentIcon
small
key={tgw.name + "-connection-" + tunnelIndex}
item={{
name: tunnel.gateway,
}}
item={tunnel}
itemName="gre_tunnels"
icon={FirewallClassic}
craig={props.craig}
/>
))}
</CraigFormGroup>
Expand Down
65 changes: 61 additions & 4 deletions client/src/lib/docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2540,17 +2540,74 @@
"power_shared_processor_pools": {
"content": [
{
"text": "NYI"
"text": "A shared processor Pool (SPP) is a pool of processor capacity that is shared between a group of virtual server instances. Unlike a virtual server instance that has a dedicated and defined maximum amount of processing capacity, you can set the reserved cores in SPP that are guaranteed to be available at the pool level. To provision a Power Shared Processor Pool, first ensure that Power VS is enabled in the Options page, along with the zone(s) you would like to provision Power VS resources in. Then create a Power VS workspace which is required before creating a Power Shared Processor Pool."
},
{
"text": "Refer to the following table for more information on Power Shared Processor Pool fields:"
},
{
"table": [
["_headers", "Field", "Description"],
[
"Name",
"Specify a Shared Processor Pool name that is unique within your cloud account. Use a name of minimum 2 characters and a maximum of 12 characters. Alphanumeric characters are not allowed."
],
["Workspace", "Specify the Power Workspace."],
[
"System Type",
"Specify the machine type. The machine type that you select determines the number of cores and memory that is available. For more information about machine types, see Hardware Specification documentation."
],
[
"Reserved Cores",
"The number of reserved cores based on resource availability and allocation. There is a core-to-vCPU ratio of 1:1 by default."
]
]
}
],
"relatedLinks": []
"relatedLinks": [
[
"https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-manage-SPP",
"Managing Shared Processor Pools"
],
[
"https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-about-virtual-server#hardware-specifications",
"IBM Power Hardware Specifications"
]
],
"last_updated": "05/31/2024"
},
"power_placement_groups": {
"content": [
{
"text": "NYI"
"text": "Power server placement groups provide you control over the host or server on which a new virtual machine (VM) is placed. By using server placement groups, you can build high availability within a data center. To provision a Power Placement Group, first ensure that Power VS is enabled in the Options page, along with the zone(s) you would like to provision Power VS resources in. Then create a Power VS workspace which is required before creating a Power Placement Group."
},
{
"text": "You can create a maximum of 25 placement groups. If you need to create more than 25 placement groups, raise a support ticket to increase the maximum limit."
},
{
"text": "Refer to the following table for more information on Power Server Placement Group fields:"
},
{
"table": [
["_headers", "Field", "Description"],
[
"Name",
"Specify a Placement Group name that is unique within your cloud account. Alphanumeric characters are not allowed."
],
["Workspace", "Specify the Power Workspace."],
[
"Placement Group Policy",
"Specify an affinity or anti-affinity policy to each VM instance within a server placement group. When you set a placement group with an affinity policy, all VMs in that placement group are launched on the same server. When you set a placement group with an anti-affinity policy, all VMs in that placement group are launched on different servers."
]
]
}
],
"relatedLinks": []
"relatedLinks": [
[
"https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-placement-groups",
"Managing Server Placement Groups"
]
],
"last_updated": "05/31/2024"
}
}
10 changes: 10 additions & 0 deletions client/src/lib/docs/release-notes.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
[
{
"version": "1.16.1",
"features": [
"Added documentation for Power VS Shared Processor Pools and Power VS Placement Groups"
],
"fixes": [],
"upgrade_notes": [
"When creating a GRE Tunnel a Remote Gateway IP and Local Gateway IP must be entered in the GRE Tunnel Form to allow for Terraform to be generated successfully"
]
},
{
"version": "1.16.0",
"features": [
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/docs/templates/oracle-rac.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dynamic_subnets": false,
"enable_power_vs": true,
"power_vs_zones": ["dal12", "dal10", "us-south"],
"craig_version": "1.16.0",
"craig_version": "1.16.1",
"power_vs_high_availability": false,
"no_vpn_secrets_manager_auth": false,
"power_vs_ha_zone_1": null,
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/docs/templates/oracle-si.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dynamic_subnets": false,
"enable_power_vs": true,
"power_vs_zones": ["dal12", "dal10", "us-south"],
"craig_version": "1.16.0",
"craig_version": "1.16.1",
"power_vs_high_availability": false,
"no_vpn_secrets_manager_auth": false,
"enable_classic": false,
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/docs/templates/power-poc-quick-start.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"enable_power_vs": true,
"enable_classic": false,
"power_vs_zones": ["dal10"],
"craig_version": "1.16.0",
"craig_version": "1.16.1",
"power_vs_high_availability": false,
"template": "Power VS POC",
"fs_cloud": false,
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/docs/templates/power-sap-hana.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dynamic_subnets": false,
"enable_power_vs": true,
"power_vs_zones": ["dal10"],
"craig_version": "1.16.0",
"craig_version": "1.16.1",
"power_vs_high_availability": false,
"template": "Power VS SAP Hana",
"no_vpn_secrets_manager_auth": false,
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/docs/templates/quick-start-power.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"enable_power_vs": true,
"enable_classic": false,
"power_vs_zones": ["dal12"],
"craig_version": "1.16.0",
"craig_version": "1.16.1",
"power_vs_high_availability": false,
"fs_cloud": false,
"no_vpn_secrets_manager_auth": false,
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/docs/templates/vpn-as-a-service.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dynamic_subnets": false,
"enable_power_vs": true,
"power_vs_zones": ["dal12", "dal10", "us-south"],
"craig_version": "1.16.0",
"craig_version": "1.16.1",
"advanced_subnets": true,
"power_vs_high_availability": false,
"no_vpn_secrets_manager_auth": false,
Expand Down
27 changes: 12 additions & 15 deletions client/src/lib/json-to-iac/transit-gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ function formatTgw(tgw, config) {
function ibmTgConnection(connection, tgw) {
let connectionName = connection.power
? connection.power
: connection.gateway
? connection.gateway + " unbound gre"
: connection.gateway || connection.local_tunnel_ip
? (connection.gateway || connection.name) + " unbound gre"
: connection.crn
? connection.crn.replace(/.+vpc:/g, "")
: connection.classic
Expand Down Expand Up @@ -103,19 +103,20 @@ function ibmTgConnection(connection, tgw) {
"id",
tgw.use_data
),
network_type: connection.gateway
? "unbound_gre_tunnel"
: connection.power
? "power_virtual_server"
: connection.classic
? "classic"
: "vpc",
network_type:
connection.gateway || connection.local_tunnel_ip
? "unbound_gre_tunnel"
: connection.power
? "power_virtual_server"
: connection.classic
? "classic"
: "vpc",
name: connectionResourceName,
network_id: networkId,
timeouts: timeouts("30m", "", "30m"),
},
};
if (connection.gateway) {
if (connection.gateway || connection.local_tunnel_ip) {
connectionData.data.base_network_type = "classic";
connectionData.data.remote_bgp_asn = isNullOrEmptyString(
connection.remote_bgp_asn,
Expand All @@ -125,11 +126,7 @@ function ibmTgConnection(connection, tgw) {
: connection.remote_bgp_asn;
connectionData.data.zone = "${var.region}-" + connection.zone;
["local_gateway_ip", "remote_gateway_ip"].forEach((field) => {
connectionData.data[
field
] = `\${ibm_network_gateway.classic_gateway_${snakeCase(
connection.gateway
)}.${field === "local_gateway_ip" ? "private" : "public"}_ipv4_address}`;
connectionData.data[field] = connection[field];
});
connectionData.data.local_tunnel_ip = connection.local_tunnel_ip;
connectionData.data.remote_tunnel_ip = connection.remote_tunnel_ip;
Expand Down
4 changes: 2 additions & 2 deletions client/src/lib/state/reusable-fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ function hasDuplicateName(field, stateData, componentProps, overrideField) {
"dns_records",
"name"
);
} else if (field === "prefix_filters") {
} else if (contains(["prefix_filters", "gre_tunnels"], field)) {
allOtherNames = nestedSplat(
componentProps.craig.store.json.transit_gateways,
"prefix_filters",
field,
"name"
);
} else if (field === "appid_key") {
Expand Down
Loading

0 comments on commit 9168442

Please sign in to comment.