Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README to include comprehensive local deploy, test, and build steps #2346

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,75 @@ To install the latest developer version (unstable) use:
pip install git+https://github.com/nebari-dev/nebari.git
```

### ⚙️⚙️⚙️ Deploying, Testing, and Packaging a Local Nebari Repo ⚙️⚙️⚙️
Tested on Debian 12
#### Prereqs:
Docker: https://docs.docker.com/engine/install/debian/#install-using-the-repository
```
sudo usermod -aG docker $USER # add current user to docker group
sudo systemctl start docker
```

conda: https://docs.anaconda.com/free/anaconda/install/linux/#installation

git:
```
apt-get install git
```

#### Clone Nebari repo:
```
git clone [email protected]:nebari-dev/nebari.git
cd nebari
```

#### Create a conda environment to build, deploy, and test Nebari:
```
conda create -n nebari0
conda activate nebari0
conda install python==3.12 pip # or python version of your choice
```

#### Test local Nebari repo:
From within the local Nebari repo directory:
```
pip install -e .
```

Create a nebari-config.yaml that targets a local kind cluster
```
nebari init local --project local-dev --domain example.local --ssl-cert-email [your@email]
```

Add to hosts file specific resolutions for .local domains specified above
```
echo -e "\n172.18.1.100 local-dev.example.local\n172.18.1.100" example.local\n | sudo tee -a /etc/hosts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not always as simple (nebari-dev/nebari-docs#403).

```

Deploy Nebari locally (as specified in the yaml file)
```
nebari deploy -c nebari-config.yaml
```

Run tests against deployed Nebari
```
pip install python-dotenv # needed for tests
pytest tests/tests_deployment
```

#### Build & package Nebari:
use pip to install further dependencies within the above environment:
```
pip install pytest-playwright build grayskull
playwright install
```
From within the local Nebari repo directory:
```
python -m build ./ --outdir ./build-temp/
grayskull pypi --strict-conda-forge build-temp/*.tar.gz --output ./build-temp/
conda build --channel=conda-forge ./build-temp/nebari
```

### Questions? 🤔

Have a look at our [Frequently Asked Questions (FAQ)][nebari-faqs] to see if your query has been answered.
Expand Down