Adding Environments to Projects in CNO¶
This section will show how you can create new environments or add your already existing environments, to your project from the Hub clusters previously added.
You have two ways of adding projects environments: from CNO's User Interface or through our command-line, cnoctl
Adding Environments to Projects through CNO's U.I.¶
Go to Onboard > Project¶
Enter your project by clicking the eye icon besides your project.
Create an Environment¶
Let's create «Myfirstenv.»
Click on Add new Environment in the upper right corner
Fill Out The form.
- Specify the namespace.
- Select cluster type to simplify your cluster search.
- Select the required cluster
- Check if the environment is in production. Leave blank if the environment is under development.
- Indicate CPU, Memory & Storage resource limits (the maximum value that the cluster needs to function)
- Advanced allows you to modify the minimum resources desired (the minimum value that the cluster needs to function)
- Press Add & repeat this action for each environment to be added to your project.
The addition of an environment is not subject to validation.
Your resource allocation within your projet cannot exceed the project quota.
In our example, Project1 imposes the limit of 1000 m (CPU), 4 Gi (Memory), 50 Gi (Storage). Of course, we can't ask for more, even more, if the project consists of several environments.
Congratulations, your environment has been created. You'll notice that its status is «Creating». This is normal as the creation is not instantaneous, it'll take a few minutes then it's status will change to «Ready»
You'll also notice 3 symbols to the right of your environment status:
- This is for viewing you environment page.
- You use this to update your environment details.
- For deleting your environment
In case your environment requires more resources to maintain it, you can increase/decrease by editing or viewing the targeted environment within the defined limits of the project.
It's almost time to put your beautiful resources to use! But first, we'll look at how to increase your project's replenishment in the next tutorial.
Adding Environments to Projects through CNOCTL¶
If you have resources in a project e.g my-first-project, you can create an environment.
We can specify resources by using --cpu, --memory and --storage flags.
You have two ways to onboard an environment on CNO:
- By importing an existing namespace on a cluster with the command:
- Or by creating a new environment with the command:
Finally, you can run the following command to get insights about the environments of your projects.
The result should look like the following:
|NAME||CPU LIMIT||CPU REQUEST||CPU USED||MEMORY LIMIT||MEMORY REQUEST||MEMORY USED||STORAGE||STORAGE USED||STATUS|
The Status of an environment can be Ready, Pending, or Failed.
Typically, the "Pending" status should only take a few minutes.
If you find any problem during this phase, it's undoubtedly due to a lack of connection between the cluster and your Kafka. Just reload, and it should be okay.