Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 407c366

Browse files
committedDec 13, 2023
Update readme with gcp provider
1 parent f2be10e commit 407c366

File tree

1 file changed

+74
-4
lines changed

1 file changed

+74
-4
lines changed
 

‎README.md

+74-4
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,25 @@ To facilite the usage of `crc-cloud`, a [container image](https://quay.io/reposi
2828

2929
### Authetication
3030

31-
All operations require to set the authentication mechanism in place. As so any `aws` authentication mechanism is supported by `crc-cloud`:
31+
All operations require to set the authentication mechanism in place.
32+
33+
As so any `aws` authentication mechanism is supported by `crc-cloud`:
3234

3335
- long term credentials `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` as environment variables
3436
- short lived credentials (in addition to `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` would require `AWS_SESSION_TOKEN`)
3537
- credentials on config file (default file ~/.aws/config), in case of multiple profiles it will also accepts `AWS_PROFILE`
3638

39+
As so any `gcp` authentication mechanism is supported by `crc-cloud`:
40+
41+
- Credentials `GOOGLE_APPLICATION_CREDENTIALS` as environment variable
42+
- Project ID `GCLOUD_PROJECT` as environment variable
43+
- Region `GCLOUD_REGION` as environment variable
44+
- Zone `GCLOUD_ZONE` as environment variable
45+
3746
### Restrictions
3847

48+
**Note**: `import` operation is not supported on `gcp` provider.
49+
3950
The `import` operation downloads and transform the bundle offered by crc into an image supported by `AWS`, as so there are some disk demanding operation. So there is a requirement of at least 70G free on disk to run this operation.
4051

4152
The AWS instance type of choice is *c6a.2xlarge* with 8vcpu and 16 GB of RAM. This will be customizable in the future, for the moment this fixed type imposes some [restrictions](https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-ec2-m6a-c6a-instances-additional-regions/) on available regions to run crc cloud, those regions are:
@@ -98,7 +109,7 @@ podman run -d --rm \
98109

99110
`create` operation is responsible for create all required resources on the cloud provider to spin the Openshift Single Node Cluster.
100111

101-
Usage:
112+
Usage: In case of `aws` provider
102113

103114
```bash
104115
create crc cloud instance on AWS
@@ -121,6 +132,29 @@ Global Flags:
121132
--pullsecret-filepath string path for pullsecret file
122133
```
123134

135+
Usage: In case of `gcp` provider
136+
137+
```bash
138+
create crc cloud instance on GCP
139+
140+
Usage:
141+
crc-cloud create gcp [flags]
142+
143+
Flags:
144+
--gcp-disk-size string Disk size in GB for the machine running the cluster. Default is 100.
145+
--gcp-image-id string GCP image identifier
146+
--gcp-instance-type string Instance type for the machine running the cluster. Default is n1-standard-8.
147+
-h, --help help for gcp
148+
149+
Global Flags:
150+
--backed-url string backed for stack state. Can be a local path with format file:///path/subpath or s3 s3://existing-bucket
151+
--key-filepath string path to init key obtained when importing the image
152+
--output string path to export assets
153+
--project-name string project name to identify the instance of the stack
154+
--pullsecret-filepath string path for pullsecret file
155+
--tags stringToString tags to add on each resource (--tags name1=value1,name2=value2) (default [])
156+
```
157+
124158
Outputs:
125159

126160
- `kubeconfig` file with the kube config to connect withint the cluster
@@ -129,7 +163,7 @@ Outputs:
129163
- `id_rsa` key to connect the remote host
130164
- `password` password generated for `kubeadmin` and `developer` default cluster users
131165

132-
Sample
166+
Sample for `aws` provider:
133167

134168
```bash
135169
podman run -d --rm \
@@ -149,6 +183,27 @@ podman run -d --rm \
149183
--key-filepath "/workspace/id_ecdsa"
150184
```
151185

186+
Sample for `gcp` provider:
187+
188+
```bash
189+
podman run -d --rm \
190+
-v ${PWD}:/workspace:z \
191+
-e GOOGLE_APPLICATION_CREDENTIALS=${gcp_credentials} \
192+
-e GCLOUD_PROJECT=${gcp_project_id} \
193+
-e GCLOUD_REGION=${gcp_region} \
194+
-e GCLOUD_ZONE=${gcp_zone} \
195+
quay.io/crcont/crc-cloud:v0.0.2 create gcp \
196+
--project-name "crc-ocp412" \
197+
--backed-url "file:///workspace" \
198+
--output "/workspace" \
199+
--tags account=qe-pt,profile=builder \
200+
--gcp-image-id "gcp-xxxx" \
201+
--gcp-instance-type "n1-standard-8" \
202+
--gcp-disk-size "100" \
203+
--pullsecret-filepath "/workspace/pullsecret" \
204+
--key-filepath "/workspace/id_ecdsa"
205+
```
206+
152207
#### Destroy
153208

154209
`destroy` operation will remove any resource created at the cloud provider, it uses the files holding the state of the infrastructure which has been store at location defined by parameter `backed-url` on `create` operation.
@@ -168,7 +223,7 @@ Flags:
168223
--provider string target cloud provider
169224
```
170225

171-
Sample
226+
Sample for `aws` provider:
172227

173228
```bash
174229
podman run -d --rm \
@@ -181,3 +236,18 @@ podman run -d --rm \
181236
--backed-url "file:///workspace" \
182237
--provider "aws"
183238
```
239+
240+
Sample for `gcp` provider:
241+
242+
```bash
243+
podman run -d --rm \
244+
-v ${PWD}:/workspace:z \
245+
-e GOOGLE_APPLICATION_CREDENTIALS=${gcp_credentials} \
246+
-e GCLOUD_PROJECT=${gcp_project_id} \
247+
-e GCLOUD_REGION=${gcp_region} \
248+
-e GCLOUD_ZONE=${gcp_zone} \
249+
quay.io/crcont/crc-cloud:v0.0.2 destroy \
250+
--project-name "crc-ocp412" \
251+
--backed-url "file:///workspace" \
252+
--provider "gcp"
253+
```

0 commit comments

Comments
 (0)
Please sign in to comment.