You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Illinois Computes Research Notebook (ICRN) enables students and researchers to access computing at scale via an easily accessible web interface. But, many scientific domains rely on a wide array of complex packages for R and Python which are not easy to install. It is common for new users of compute systems to spend hours attempting to configure their environments.
5
5
6
-
The ICRN Kernel Manager aims to eliminate this barrier.
6
+
The ICRN Kernel Manager aims to eliminate this barrier by providing a simple command-line interface and web-based catalog for managing pre-configured kernel environments.
7
+
8
+
## Architecture Overview
9
+
10
+
The ICRN Kernel Manager consists of three main components:
11
+
12
+
1.**Command-Line Interface (`icrn_manager`)**: The primary tool for users to discover, download, and activate kernel environments
13
+
2.**Kernel Indexer**: A containerized service that indexes kernel repositories and generates JSON manifest files containing package information
14
+
3.**Web Interface**: A FastAPI + Nginx web server that provides a browser-based interface for exploring available kernels and searching for packages
./icrn_manager kernels get <language><kernel><version>
50
-
```
51
-
Example:
52
-
```sh
53
-
./icrn_manager kernels get R cowsay 1.0
54
-
./icrn_manager kernels get Python numpy 1.24.0
55
-
```
56
-
This command obtains the correct environment from the central repository, unpacks it, identifies the location of the packages, and updates the user's catalogue with this information.
Kernel 'numpy-1.24.0' is now available in Jupyter.
113
-
/u/hdpriest/.icrn/icrn_kernels/cowsay
114
-
Found. Linking and Activating...
115
-
Using /u/hdpriest/.icrn_b/icrn_kernels/cowsay within R...
116
-
Done.
117
-
118
-
```
119
-
This command updates the user's ```~{HOME}/.Renviron``` file with the location of the indicated kernel. Only one package-set can be 'in-use' at any time. Package-sets can be switched without 'get'ing them again.
120
-
121
-
Note that the user doesn't have to download, install, or compile any R packages at all.
122
76
123
77
### Switch to a different set of packages
124
78
```sh
@@ -130,37 +84,72 @@ Note that the user doesn't have to download, install, or compile any R packages
130
84
./icrn_manager kernels use R none
131
85
```
132
86
87
+
## Kernel Indexer
88
+
89
+
The kernel indexer is a containerized service that indexes kernel repositories and generates JSON manifest files. It scans kernel directories, extracts package information, and creates two key files:
90
+
91
+
-`collated_manifests.json`: A kernel-centric index listing all available kernels with their packages
92
+
-`package_index.json`: A package-centric index showing which kernels contain each package
The kernel indexer is designed to run as a Kubernetes CronJob. See [`kernel-indexer/README.md`](kernel-indexer/README.md) for detailed deployment instructions.
114
+
115
+
For more information, see the [Kernel Indexer documentation](kernel-indexer/README.md) and [design document](kernel-indexer/DESIGN.md).
116
+
133
117
## Web Interface
134
118
135
-
The ICRN Kernel Manager includes a web-based interface for browsing available kernels and searching for packages. The web interface provides an intuitive way to explore the kernel catalog without using the command line.
119
+
The ICRN Kernel Manager includes a web-based interface for browsing available kernels and searching for packages. The web interface reads the JSON files generated by the kernel indexer and provides an intuitive way to explore the kernel catalog without using the command line.
136
120
137
-
### Starting the Web Interface with Docker
121
+
### Prerequisites
122
+
123
+
The web interface requires the JSON files generated by the kernel indexer:
124
+
-`collated_manifests.json`
125
+
-`package_index.json`
138
126
139
-
The web interface runs in a Docker container. To start it:
127
+
These files should be located in the data directory or mounted as volumes.
The web service will automatically detect and load these files.
162
151
163
-
4. **Access the web interface:**
152
+
3.**Access the web interface:**
164
153
165
154
Open your web browser and navigate to:
166
155
```
@@ -175,19 +164,53 @@ The web interface provides two main views:
175
164
176
165
-**View Packages**: Search for packages by name to see which kernels contain them. Results show the language, kernel name, kernel version, and package version for each match.
177
166
178
-
### Managing the Docker Container
167
+
### API Endpoints
179
168
180
-
- **Rebuild after making changes:**
181
-
```sh
182
-
docker stop icrn-web
183
-
docker rm icrn-web
184
-
docker build -t icrn-web ./web
185
-
docker run -d -p 8080:80 --name icrn-web icrn-web
186
-
```
169
+
The web interface exposes a REST API:
187
170
188
-
## Implementation Details
171
+
-`GET /`: API information and status
172
+
-`GET /health`: Health check endpoint
173
+
-`GET /api/languages`: Get list of available languages
174
+
-`GET /api/kernels/{language}`: Get all kernels for a specific language
175
+
-`GET /api/kernel/{language}/{kernel_name}/{version}`: Get specific kernel details
176
+
-`GET /api/manifest/{language}/{kernel_name}/{version}`: Get package manifest for a kernel
177
+
-`GET /api/package/{package_name}`: Get all kernels containing a package
178
+
-`GET /api/packages/search`: Search for packages by name
179
+
-`POST /api/refresh`: Manually trigger data refresh (reloads JSON files from disk)
180
+
181
+
For more information, see the [Web Interface documentation](web/README.md).
182
+
183
+
## Containerized Deployment
184
+
185
+
The ICRN Kernel Manager components are containerized for easy deployment:
186
+
187
+
### Available Container Images
188
+
189
+
1.**Kernel Indexer**: `icrn-kernel-indexer`
190
+
- Automatically builds and pushes to Docker Hub on commits to `main`/`develop` branches
191
+
- Designed for Kubernetes CronJob deployment
192
+
- See [kernel-indexer/README.md](kernel-indexer/README.md) for details
193
+
194
+
2.**Web Server**: `icrn-kernel-webserver`
195
+
- Automatically builds and pushes to Docker Hub on commits to `main`/`develop` branches
196
+
- FastAPI backend with Nginx reverse proxy
197
+
- See [web/README.md](web/README.md) for details
198
+
199
+
3.**Apptainer/Singularity Support**: The kernel indexer also supports Apptainer/Singularity containers
200
+
- See [kernel-indexer/APPTAINER_EXAMPLE.md](kernel-indexer/APPTAINER_EXAMPLE.md) for usage
201
+
202
+
### Continuous Integration
203
+
204
+
GitHub Actions workflows automatically build and push Docker images:
205
+
206
+
-`docker-build-indexer.yml`: Builds and pushes kernel indexer container
207
+
-`docker-build-webserver.yml`: Builds and pushes web server container
208
+
-`docker-build.yml`: Builds the main CLI tool container
209
+
210
+
All workflows trigger on pushes and pull requests to `main` and `develop` branches.
211
+
212
+
## Testing
189
213
190
-
### Testing
191
214
The project includes a comprehensive test suite to ensure reliability and code quality:
192
215
193
216
```sh
@@ -199,6 +222,7 @@ The project includes a comprehensive test suite to ensure reliability and code q
199
222
./tests/run_tests.sh update_r_libs # R library management
0 commit comments