This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.18.5.2.2.2. 使用单个命令创建 AWS 资源
							如果您不需要在修改 AWS 资源前查看 ccoctl 工具创建的 JSON 文件,并且如果 ccoctl 工具用于创建 AWS 资源的过程会自动满足您的要求,则可以使用 ccoctl aws create-all 命令自动创建 AWS 资源。
						
否则,您可以单独创建 AWS 资源。
								默认情况下,ccoctl 在运行命令的目录中创建对象。要在其他目录中创建对象,请使用 --output-dir 标志。此流程使用 < ;path_to_ccoctl_output_dir > 来引用此目录。
							
先决条件
- 
									提取并准备 ccoctl二进制文件。
流程
- 从 OpenShift Container Platform 发行镜像中提取 - CredentialsRequest对象列表:- oc adm release extract \ --credentials-requests \ --cloud=aws \ --to=<path_to_directory_with_list_of_credentials_requests>/credrequests \ --from=quay.io/<path_to>/ocp-release:<version> - $ oc adm release extract \ --credentials-requests \ --cloud=aws \ --to=<path_to_directory_with_list_of_credentials_requests>/credrequests \- 1 - --from=quay.io/<path_to>/ocp-release:<version>- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- credrequests是存储- CredentialsRequest对象列表的目录。如果该目录不存在,此命令就会创建该目录。
 
- 使用 - ccoctl工具处理- credrequests目录中的所有- CredentialsRequest对象:- ccoctl aws create-all \ --name=<name> \ --region=<aws_region> \ --credentials-requests-dir=<path_to_directory_with_list_of_credentials_requests>/credrequests - $ ccoctl aws create-all \ --name=<name> \ --region=<aws_region> \ --credentials-requests-dir=<path_to_directory_with_list_of_credentials_requests>/credrequests- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
验证
- 要验证 OpenShift Container Platform secret 是否已创建,列出 - <path_to_ccoctl_output_dir>/manifests目录中的文件:- ll <path_to_ccoctl_output_dir>/manifests - $ ll <path_to_ccoctl_output_dir>/manifests- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 输出示例: - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
您可以通过查询 AWS 来验证是否已创建 IAM 角色。如需更多信息,请参阅有关列出 IAM 角色的 AWS 文档。