Skip to content

Commit

Permalink
Add Local Build & Test Steps to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tylergraff authored Mar 19, 2024
1 parent 13923e4 commit b382891
Showing 1 changed file with 69 additions and 0 deletions.
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
```

### ⚙️⚙️⚙️ Installing, 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
```

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

0 comments on commit b382891

Please sign in to comment.