此内容没有您所选择的语言版本。
Chapter 1. Developing using containers and the cloud in CodeReady Studio
1.1. Using Red Hat CodeReady Containers tools in CodeReady Studio
Red Hat CodeReady Containers (CRC) brings a minimal OpenShift 4 cluster to your local computer. This cluster provides a minimal environment for development and testing purposes. It is mainly targeted at running on developers' desktops. For other use cases, such as headless, multi-developer or team-based setups, use of the full-fledged OpenShift installer is recommended.
For a more in-depth introduction to OpenShift, see OpenShift documentation.
1.1.1. Downloading and installing Red Hat CodeReady Containers
The following section describes how to set up CodeReady Containers in CodeReady Studio.
Prerequisites
- Download the latest release of CodeReady Containers and the pull secret.
Extract the CRC file.
For more information on how to install and set up CRC, see the Installation chapter of the Getting started with CodeReady Containers Guide.
Procedure
- Start CodeReady Studio.
Click
. The Show View window appears.
- Enter Server in the search field.
- Select Servers.
Click
.The Servers view appears.
Right-click any area in the Servers view.
Click
. The Define a New Server window appears.
- Select CodeReady Containers 1.0+.
Click
.The CodeReady Containers window appears.
- Click CRC binary. to locate the
- Click CRC Pull Secret File. to locate the
- Click .
Your newly added CodeReady Containers 1.0+ server adapter is now listed in the Servers view.
![crs crc server adapter created](https://access.redhat.com/webassets/avalon/d/Red_Hat_CodeReady_Studio-12.21.3-Getting_Started_with_Container_and_Cloud-based_Development-en-US/images/58eeddf610bdc798ca2d278349f0a66a/crs-crc-server-adapter-created.png)
In case you did not set up CRC prior to starting the server adapter, you will see a warning: CRC has not been properly initialized!
![crs crc warning](https://access.redhat.com/webassets/avalon/d/Red_Hat_CodeReady_Studio-12.21.3-Getting_Started_with_Container_and_Cloud-based_Development-en-US/images/47f3645115b1fd765c59c0f8175b593b/crs-crc-warning.png)
Follow the on-screen instructions to initialize CRC.
The instructions prompt you for optional, anonymous usage data collection to assist with development. No personally identifiable information is collected. For information on changing your settings later, visit Red Hat CodeReady Containers - Consent for telemetry data collection.
1.1.2. Using OpenShift Container Platform tools
The following section describes how to use OpenShift Containers in CodeReady Studio.
Prerequisites
The CRC server adapter is set up and configured.
For more information, see Downloading and installing CRC.
Procedure
- Start CodeReady Studio.
Start the CRC server adapter.
Click
. The Show View window appears.
- Enter OpenShift in the search field.
- Select OpenShift Explorer.
Click
.The OpenShift Explorer view appears.
For information on how to set up a new OpenShift connection, visit Creating a new OpenShift Container Platform connection.
Press Ctrl+N.
The Select a wizard window appears.
- Enter OpenShift in the search field.
- Select OpenShift Application.
Click
.The Sign in to OpenShift window appears.
Provide your credentials and click
.The Create OpenShift Project window appears.
- Name your project.
Click
.The Select template window appears.
- Select a template.
Click
.The Template Parameters window appears.
- Ensure that the template parameters are correct.
Click
.The Create Application Summary window appears.
- Ensure that the application details are correct.
Click
.The Import OpenShift Application window appears.
- Choose the location for your git repository clone.
- Click .
Your newly created OpenShift project and application are now listed in the OpenShift Explorer view.
![crs os project created](https://access.redhat.com/webassets/avalon/d/Red_Hat_CodeReady_Studio-12.21.3-Getting_Started_with_Container_and_Cloud-based_Development-en-US/images/b4387ad7b49be580fab7ae0681cbd02e/crs-os-project-created.png)
Additional resources
- For more information on how to perform additional tasks with OpenShift Container Platform projects and applications, see Developing for the Cloud with OpenShift in CodeReady Studio.