Skip to content

Commit

Permalink
Merge pull request #74 from datawire/rlane/documentation-updates
Browse files Browse the repository at this point in the history
Documentation updates
  • Loading branch information
rick-a-lane-ii authored Mar 5, 2024
2 parents 6ea86fd + 99361f2 commit a24a6b4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 189 deletions.
184 changes: 9 additions & 175 deletions .github/actions/provision-cluster/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cluster Provisioning

## Example Usage

Use the `provision-cluster` action as described below:

```yaml
Expand All @@ -12,189 +14,21 @@ Use the `provision-cluster` action as described below:
# Tells provision-cluster where to write the kubeconfig file.
kubeconfig: path/to/kubeconfig.yaml

## For kubeception klusters
## For Kubeception klusters

# A kubeception secret token
# A Kubeception secret token
kubeceptionToken: ...

## For GKE clusters:

# A json encoded string containing GKE credentials:
gkeCredentials: ...
# A json encoded string containing additional GKE cluster configuration. See GKE Cluster Config Options section for details.

# A json encoded string containing additional GKE cluster configuration.
# Reference the GKE API for more information.
gkeConfig: ...
```
## GKE Cluster Config Options
## References
The values included below are the defaults.
```json
{
"resourceLabels": {
"provisioned-category": "ephemeral",
"provisioned-lifespan": "1800"
},
"description": "",
"initialNodeCount": 1,
"nodeConfig": {
"oauthScopes": [
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring"
],
"tags": [],
"accelerators": [],
"taints": [],
"metadata": {
"disable-legacy-endpoints": "true"
},
"labels": {},
"machineType": "e2-standard-2",
"diskSizeGb": 100,
"imageType": "COS_CONTAINERD",
"localSsdCount": 0,
"serviceAccount": "default",
"preemptible": false,
"diskType": "pd-standard",
"minCpuPlatform": "",
"workloadMetadataConfig": null,
"sandboxConfig": null,
"nodeGroup": "",
"reservationAffinity": null,
"shieldedInstanceConfig": {
"enableSecureBoot": false,
"enableIntegrityMonitoring": true
},
"linuxNodeConfig": null,
"kubeletConfig": null,
"bootDiskKmsKey": "",
"gcfsConfig": null,
"advancedMachineFeatures": null,
"gvnic": null,
"spot": false,
"confidentialNodes": null,
"loggingConfig": null
},
"loggingService": "logging.googleapis.com/kubernetes",
"monitoringService": "monitoring.googleapis.com/kubernetes",
"network": "default",
"clusterIpv4Cidr": "10.0.0.0/14",
"addonsConfig": {
"httpLoadBalancing": null,
"horizontalPodAutoscaling": null,
"kubernetesDashboard": {
"disabled": true
},
"networkPolicyConfig": {
"disabled": true
},
"cloudRunConfig": null,
"dnsCacheConfig": null,
"configConnectorConfig": null,
"gcePersistentDiskCsiDriverConfig": {
"enabled": true
},
"gcpFilestoreCsiDriverConfig": null
},
"subnetwork": "default",
"enableKubernetesAlpha": false,
"labelFingerprint": "81c637a5",
"legacyAbac": {
"enabled": false
},
"networkPolicy": null,
"ipAllocationPolicy": {
"useIpAliases": true,
"createSubnetwork": false,
"subnetworkName": "",
"clusterIpv4Cidr": "10.0.0.0/14",
"nodeIpv4Cidr": "",
"servicesIpv4Cidr": "10.124.16.0/20",
"clusterSecondaryRangeName": "gke-test-3fceb6744f7639bc0d6e9b601a051071-pods-da48a07c",
"servicesSecondaryRangeName": "gke-test-3fceb6744f7639bc0d6e9b601a051071-services-da48a07c",
"clusterIpv4CidrBlock": "10.0.0.0/14",
"nodeIpv4CidrBlock": "",
"servicesIpv4CidrBlock": "10.124.16.0/20",
"tpuIpv4CidrBlock": "",
"useRoutes": false
},
"masterAuthorizedNetworksConfig": null,
"maintenancePolicy": {
"window": null,
"resourceVersion": "e3b0c442"
},
"binaryAuthorization": null,
"autoscaling": null,
"networkConfig": {
"network": "projects/datawireio/global/networks/default",
"subnetwork": "projects/datawireio/regions/us-central1/subnetworks/default",
"enableIntraNodeVisibility": false,
"defaultSnatStatus": null,
"enableL4ilbSubsetting": false,
"datapathProvider": "DATAPATH_PROVIDER_UNSPECIFIED",
"privateIpv6GoogleAccess": "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED",
"dnsConfig": null,
"serviceExternalIpsConfig": {
"enabled": false
}
},
"defaultMaxPodsConstraint": {
"maxPodsPerNode": "110"
},
"resourceUsageExportConfig": null,
"authenticatorGroupsConfig": null,
"privateClusterConfig": null,
"databaseEncryption": {
"keyName": "",
"state": "DECRYPTED"
},
"verticalPodAutoscaling": null,
"shieldedNodes": {
"enabled": true
},
"releaseChannel": {
"channel": "REGULAR"
},
"workloadIdentityConfig": null,
"notificationConfig": {
"pubsub": {
"enabled": false,
"topic": "",
"filter": null
}
},
"confidentialNodes": null,
"identityServiceConfig": null,
"meshCertificates": null,
"initialClusterVersion": "1.22.12-gke.2300",
"nodeIpv4CidrSize": 0,
"servicesIpv4Cidr": "10.124.16.0/20",
"enableTpu": false,
"tpuIpv4CidrBlock": "",
"autopilot": null,
"loggingConfig": {
"componentConfig": {
"enableComponents": ["SYSTEM_COMPONENTS", "WORKLOADS"]
}
},
"monitoringConfig": {
"componentConfig": {
"enableComponents": ["SYSTEM_COMPONENTS"]
},
"managedPrometheusConfig": null
},
"nodePoolAutoConfig": {
"networkTags": null
},
"nodePoolDefaults": {
"nodeConfigDefaults": {
"gcfsConfig": null,
"loggingConfig": {
"variantConfig": {
"variant": "DEFAULT"
}
}
}
}
}
```
- [GKE API](https://cloud.google.com/kubernetes-engine/docs/reference/rest)
8 changes: 4 additions & 4 deletions github-runner-provisioner/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Self-hosted GitHub action runners
# Self-hosted GitHub Action Runners

This service is based on the [echo template](https://github.com/datawire/infrastructure/tree/master/echo). Please view the [README](https://github.com/datawire/infrastructure/tree/master/echo) for details about the dev loop and how it works.

Expand All @@ -16,7 +16,7 @@ AWS runners are created in EC2 using the AWS SDK. See the [aws_runners](internal

CodeMagic runners are actually CodeMagic Builds (CI jobs in their service) that then pull the GitHub Self-Hosted binaries and register themselves as ephemeral (single-use) runners - picking up a single job from the calling repo and then terminating.

## Testing the application
## Testing

### Integration Tests

Expand All @@ -35,7 +35,7 @@ make test-runners

**Note**: You can send requests to the production client using `make run-<runner tag>` Be careful when sending requests to production using an HTTP client, since the `dry-run` request parameter defaults to true. This is necessary because we have no way to set GitHub to send this parameter.

### Unit tests
### Unit Tests

Some unit tests use mocks generated by gomock. If the interface being mocked is updated, you may have to re-generate the mocks by running:

Expand All @@ -53,4 +53,4 @@ The runner provisioner requires the following variables to be configured:
`/Keybase/team/datawireio/infra/github-runner-provisioner-secrets`
- `CODEMAGIC_TOKEN` - the secret used to authenticate to the CodeMagic build API to trigger M1 runners
- `USE_CODEMAGIC` - a boolean flag to indicate whether to use CodeMagic or AWS to provision M1 runners
- AWS auth can be configured with `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` or by using the aws cli
- AWS auth can be configured with `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` or by using the AWS CLI
10 changes: 0 additions & 10 deletions provision-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@

GitHub Actions are released by creating a semver tag and pushing it to GitHub. No additional steps are needed.

### Step 1: Query existing tags

Use `git pull` to make sure you have all tags locally and then use `git tag -l` to find existing tag names. Release tags are of the form `vX.Y.Z` and release versions should follow semver.

### Step 2: Tag with your new version number

Use `git tag vX.Y.Z` to tag with your new version number, and then run `git push --tags` to push the new tag up to GitHub.

### Step 3: Verify the release works by updating the smoke test workflow

Once the tag is pushed, then verify the release by using it in the smoke test workflow. Do this by editing `.github/workflows/smoke.yaml`, search for the uses line and update the version to the newly released tag.

```yaml
Expand Down

0 comments on commit a24a6b4

Please sign in to comment.