Skip to content

Commit

Permalink
Add nebari typer cli changes (#150)
Browse files Browse the repository at this point in the history
Co-authored-by: Pavithra Eswaramoorthy <[email protected]>
Co-authored-by: iameskild <[email protected]>
Co-authored-by: eskild <[email protected]>
  • Loading branch information
4 people authored Oct 21, 2022
1 parent b04c483 commit 6863716
Show file tree
Hide file tree
Showing 13 changed files with 253 additions and 37 deletions.
21 changes: 19 additions & 2 deletions docs/docs/getting-started/installing-nebari.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,33 @@ You can verify that Nebari is properly installed, and you are able to execute th
nebari --help
```

![A representation of the output generated when Nebari help command argument is executed, the output contains a list of the available positional arguments and their use.](/img/getting-started/validate_installation.png "Nebari's help command line output")
![A representation of the output generated when Nebari help command argument is executed, the output contains a list of the available commands and their use.](/img/getting-started/nebari-help.png "Nebari's help command line output")

:::note Troubleshooting
If you are unable to successfully validate the Nebari installation above, you may want to check out our [troubleshooting guide][nebari-troubleshooting].
:::

---

## What's next?

### Nebari Init and Guided Init

Nebari Init creates and initializes your Nebari configuration. Guided init does the same but you can have a step-by-step experience while running it.

You can pass the `--help` flag to the `init` command to check all the arguments and options available for it.

```bash
nebari init --help
```

![A representation of the output generated when Nebari init help command is executed, the output contains a list of the available options and arguments and their use.](/img/getting-started/nebari-init-help-2.png "Nebari's init help command line output")

:::tip
You can pass the `--guided-init` flag to the `init` command to interact with Guided Init Wizard.
:::

## Next steps?

Need more information before deploying Nebari? Check out the following sections in the documentation:

- To get more insights on the **multiple deployment methods for Nebari** - check out the [Choosing a deployment platform][nebari-deploy] guide
Expand Down
68 changes: 59 additions & 9 deletions docs/docs/how-tos/nebari-aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ description: A basic overview of how to deploy Nebari on AWS
This guide is to help first-time users set up an Amazon Web Services (AWS) account specifically for the purpose of using and deploying Nebari at a production scale. In this guide
we will walk you through the following steps:

- [Introduction](#introduction)
- [Sign up for Amazon Web Services](#sign-up-for-amazon-web-services)
- [Authentication](#authentication)
- [Nebari Initialize](#nebari-initialize)
- [Deploying Nebari](#deploying-nebari)
- [Destroying Nebari](#destroying-nebari)

If you are already familiar to AWS services, feel free to skip this first step and jump straight to the [Nebari authentication](#authentication) section of this guide.

Expand Down Expand Up @@ -105,24 +107,50 @@ environment variables have been properly set. It is time to initialize and deplo
mkdir nebari-aws && cd nebari-aws
```

2. Executing the command below will generate a basic config file with an infrastructure based on **AWS**, with project name `projectname`, endpoint domain `domain`, and with the authentication mode set to **password**.
2. Executing the `nebari init --guided-init` command prompts you to respond to a set of questions, which will be used to generate the
[`nebari-config.yaml`](https://docs.qhub.dev/en/latest/source/installation/configuration.html) file with an infrastructure based on **AWS**.

```bash
nebari init --guided-init
```
![A representation of the output generated when Nebari init guided-init command is executed.](/img/how-tos/nebari-aws.png)

:::tip
If you prefer not using the `guided-init` command then you can directly run the `init` command.

Executing the command below will generate a `nebari-config.yaml` file with the Nebari cluster deployed on **AWS**, with project name `projectname`, endpoint domain `domain`, and with the authentication mode set to **password**.

```bash
nebari init aws --project projectname \
--domain domain \
--auth-provider password
--domain domain \
--auth-provider password
```
:::

:::note
You will be prompted to enter values for some choices above if they are absent from the command line arguments (for example, project name and domain)
You will be prompted to enter values for some of the choices above if they are absent from the command line arguments (for example, project name and domain)
:::

Once `nebari init` is executed, you should then be able to see the following output:

```bash
Securely generated default random password=*** for Keycloak root user
stored at path=/tmp/NEBARI_DEFAULT_PASSWORD
INFO:botocore.credentials:Found credentials in environment variables.
Securely generated default random password=*** for Keycloak root user stored at path=/tmp/QHUB_DEFAULT_PASSWORD
Congratulations, you have generated the all important nebari-config.yaml file 🎉
You can always make changes to your nebari-config.yaml file by editing the file directly.
If you do make changes to it you can ensure its still a valid configuration by running:
nebari validate --config path/to/nebari-config.yaml
For reference, if the previous Guided Init answers were converted into a direct nebari init command, it would be:
nebari init <cloud-provider> --project-name <project-name> --domain-name <domain-name> --namespace dev --auth-provider password
You can now deploy your Nebari instance with:
nebari deploy -c nebari-config.yaml
For more information, run nebari deploy --help or check out the documentation: https://www.nebari.dev/how-tos/
```
:::tip
Expand All @@ -135,14 +163,21 @@ server once Nebari's infrastructure is fully deployed, to create the first user
The Nebari initialization scripts create a `nebari-config.yaml` file that contains a collection of default preferences and settings for your deployment.
The generated `nebari-config.yaml` is the configuration file that will determine how the cloud infrastructure and Nebari is built and deployed in the next step.
Since it is a plain text file, you can edit it manually if you are unhappy with the choices you made during initialization, or delete it and start over again by re-running `nebari init`.
The generated `nebari-config.yaml` is the configuration file that will determine how the cloud infrastructure and Nebari is built and deployed in the next step. Since it is a
plain text file, you can edit it manually if you are unhappy with the choices you made during initialization, or delete it and start over again by re-running `nebari init/nebari init --guided-init`.
For additional information about the `nebari-config.yaml` file and extra flags that allow you to configure the initialization process, see the
[Understanding the `nebari-config.yaml` file](/tutorials) documentation.
## Deploying Nebari
To see all the options available for the deploy command, run the following command:
```bash
nebari deploy --help
```
![A representation of the output generated when nebari deploy help command is executed.](/img/how-tos/nebari-deploy-help.png)
With the `nebari-config.yaml` configuration file now created, Nebari can be deployed for the first time. Type the following command on your command line:
```bash
Expand Down Expand Up @@ -174,3 +209,18 @@ Kubecloak master realm username=root *****
Congratulations! You have successfully deployed Nebari on AWS! From here, see \[Initial Nebari Configuration\] for instructions on the first steps you should take to prepare your
Nebari instance for your team's use.
## Destroying Nebari
To see all the options available for the destroy command, type the following command on your command line:
```bash
nebari destroy --help
```
![A representation of the output generated when nebari deploy help command is executed.](/img/how-tos/nebari-destroy-help.png)
Nebari also has a `destroy` command that works the same way the deploy works but instead of creating the provisioned resources it destroys it.
```bash
nebari destroy -c nebari-config.yaml
```
64 changes: 57 additions & 7 deletions docs/docs/how-tos/nebari-azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ description: A basic overview of how to deploy Nebari on Azure
This guide is to help first-time users set up an Azure account specifically for the purpose of using and deploying Nebari at a production scale. In this guide we will walk you
through the following steps:

- [Introduction](#introduction)
- [Sign up for Azure](#sign-up-for-azure)
- [Authentication](#authentication)
- [Nebari Initialize](#nebari-initialize)
- [Deploying Nebari](#deploying-nebari)
- [Destroying Nebari](#destroying-nebari)

For those already familiar to Azure subscriptions and infrastructure services, feel free to skip this first step and jump straight to the [Nebari authentication](#authentication)
section of this guide.
Expand Down Expand Up @@ -88,13 +90,25 @@ environment variables have been properly set. It is time to initialize and deplo
mkdir nebari-azure && cd nebari-azure
```

2. Executing the command below will generate a basic config file with an infrastructure based on **Azure**, with project name `projectname`, endpoint domain `domain`, and with the authentication mode set to **password**.
2. Executing the `nebari init --guided-init` command prompts you to respond to a set of questions, which will be used to generate the
`nebari-config.yaml` file with the Nebari cluster deployed on **Azure**.

```bash
nebari init azure --project projectname \
--domain domain \
--auth-provider password
```bash
nebari init --guided-init
```
![A representation of the output generated when Nebari init guided-init command is executed.](/img/how-tos/nebari-azure.png)

:::tip
If you prefer not using the `guided-init` command then you can directly run the `init` command.

Executing the command below will generate a `nebari-config.yaml` file with an infrastructure based on **Azure**, with project name `projectname`, endpoint domain `domain`, and with the authentication mode set to **password**.

```bash
nebari init azure --project projectname \
--domain domain \
--auth-provider password
```
:::

:::note
You will be prompted to enter values for some choices above if they are absent from the command line arguments (for example, project name and domain)
Expand All @@ -103,8 +117,23 @@ You will be prompted to enter values for some choices above if they are absent f
Once `nebari init` is executed, you should then be able to see the following output:

```bash
Securely generated default random password=*** for Keycloak root user
stored at path=/tmp/NEBARI_DEFAULT_PASSWORD
Securely generated default random password=*** for Keycloak root user stored at path=/tmp/QHUB_DEFAULT_PASSWORD
Congratulations, you have generated the all important nebari-config.yaml file 🎉
You can always make changes to your nebari-config.yaml file by editing the file directly.
If you do make changes to it you can ensure its still a valid configuration by running:
nebari validate --config path/to/nebari-config.yaml
For reference, if the previous Guided Init answers were converted into a direct nebari init command, it would be:
nebari init <cloud-provider> --project-name <project-name> --domain-name <domain-name> --namespace dev --auth-provider password
You can now deploy your Nebari instance with:
nebari deploy -c nebari-config.yaml
For more information, run nebari deploy --help or check out the documentation: https://www.nebari.dev/how-tos/
```
:::tip
Expand All @@ -125,6 +154,13 @@ For additional information about the `nebari-config.yaml` file and extra flags t
## Deploying Nebari
To see all the options available for the deploy command, run the following command:
```bash
nebari deploy --help
```
![A representation of the output generated when nebari deploy help command is executed.](/img/how-tos/nebari-deploy-help.png)
With the `nebari-config.yaml` configuration file now created, Nebari can be deployed for the first time. Type the following command on your command line:
```bash
Expand Down Expand Up @@ -156,3 +192,17 @@ Kubecloak master realm username=root *****
Congratulations! You have successfully deployed Nebari on Azure! From here, see \[Initial Nebari Configuration\] for instructions on the first steps you should take to prepare your
Nebari instance for your team's use.
## Destroying Nebari
To see all the options available for the destroy command, type the following command on your command line:
```bash
nebari destroy --help
```
![A representation of the output generated when nebari deploy help command is executed.](/img/how-tos/nebari-destroy-help.png)
Nebari also has a `destroy` command that works the same way the deploy works but instead of creating the provisioned resources it destroys it.
```bash
nebari destroy -c nebari-config.yaml
66 changes: 58 additions & 8 deletions docs/docs/how-tos/nebari-do.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ description: A basic overview of how to deploy Nebari on Digital Ocean
This guide is to help first-time users set up a Digital Ocean (DO) account specifically for the purpose of using and deploying Nebari at a production scale. In this guide we will
walk you through the following steps:

- [Introduction](#introduction)
- [Sign up for Digital Ocean](#sign-up-for-digital-ocean)
- [Authentication](#authentication)
- [Nebari Initialize](#nebari-initialize)
- [Deploying Nebari](#deploying-nebari)
- [Destroying Nebari](#destroying-nebari)

For those already familiar to Digital Ocean, feel free to skip this first step and jump straight to the [Nebari authentication](#authentication) section of this guide.

Expand Down Expand Up @@ -84,23 +86,50 @@ environment variables have been properly set. It is time to initialize and deplo
mkdir nebari-do && cd nebari-do
```

2. Executing the command below will generate a basic config file with an infrastructure based on **DO**, with project name `projectname`, endpoint domain `domain`, and with the authentication mode set to **password**.
2. Executing the `nebari init --guided-init` command prompts you to respond to a set of questions, which will be used to generate the
`nebari-config.yaml` file with the Nebari cluster deployed on **DO**.

```bash
nebari init do --project projectname \
--domain domain \
--auth-provider password
```bash
nebari init --guided-init
```
![A representation of the output generated when Nebari init guided-init command is executed.](/img/how-tos/nebari-do.png)

:::tip
If you prefer not using the `guided-init` command then you can directly run the `init` command.

Executing the command below will generate a `nebari-config.yaml` file with the Nebari cluster deployed on **DO**, with project name `projectname`, endpoint domain `domain`, and with the authentication mode set to **password**.

```bash
nebari init do --project projectname \
--domain domain \
--auth-provider password
```
:::

:::note
You will be prompted to enter values for some choices above if they are absent from the command line arguments (for example, project name and domain)
You will be prompted to enter values for some of the choices above if they are absent from the command line arguments (for example, project name and domain)
:::

Once `nebari init` is executed, you should then be able to see the following output:

```bash
Securely generated default random password=*** for Keycloak root user
stored at path=/tmp/NEBARI_DEFAULT_PASSWORD
Securely generated default random password=*** for Keycloak root user stored at path=/tmp/QHUB_DEFAULT_PASSWORD
Congratulations, you have generated the all important nebari-config.yaml file 🎉
You can always make changes to your nebari-config.yaml file by editing the file directly.
If you do make changes to it you can ensure its still a valid configuration by running:
nebari validate --config path/to/nebari-config.yaml
For reference, if the previous Guided Init answers were converted into a direct nebari init command, it would be:
nebari init <cloud-provider> --project-name <project-name> --domain-name <domain-name> --namespace dev --auth-provider password
You can now deploy your Nebari instance with:
nebari deploy -c nebari-config.yaml
For more information, run nebari deploy --help or check out the documentation: https://www.nebari.dev/how-tos/
```
:::tip
Expand All @@ -121,6 +150,13 @@ For additional information about the `nebari-config.yaml` file and extra flags t
## Deploying Nebari
To see all the options available for the deploy command, run the following command:
```bash
nebari deploy --help
```
![A representation of the output generated when nebari deploy help command is executed.](/img/how-tos/nebari-deploy-help.png)
With the `nebari-config.yaml` configuration file now created, Nebari can be deployed for the first time. Type the following command on your command line:
```bash
Expand Down Expand Up @@ -152,3 +188,17 @@ Kubecloak master realm username=root *****
Congratulations! You have successfully deployed Nebari on DO! From here, see \[Initial Nebari Configuration\] for instructions on the first steps you should take to prepare your
Nebari instance for your team's use.
## Destroying Nebari
To see all the options available for the destroy command, type the following command on your command line:
```bash
nebari destroy --help
```
![A representation of the output generated when nebari deploy help command is executed.](/img/how-tos/nebari-destroy-help.png)
Nebari also has a `destroy` command that works the same way the deploy works but instead of creating the provisioned resources it destroys it.
```bash
nebari destroy -c nebari-config.yaml
Loading

0 comments on commit 6863716

Please sign in to comment.