|
13 | 13 | 8. [Create Accounts And Exported Buckets](#create-accounts-and-exported-buckets)
|
14 | 14 | 9. [Enable NooBaa service](#enable-noobaa-service)
|
15 | 15 | 10. [Run S3 Requests Toward NooBaa](#run-s3-requests-toward-noobaa)
|
| 16 | +11. [Run NooBaa NC inside a container](#run-noobaa-nc-inside-a-container) |
16 | 17 |
|
17 | 18 | ## Introduction
|
18 | 19 | Welcome to the NooBaa Non Containerized guide.
|
@@ -221,3 +222,168 @@ This is the content of object1
|
221 | 222 | s3-nb-account ls s3://s3bucket
|
222 | 223 | 2023-09-21 11:55:01 31 object1.txt
|
223 | 224 | ```
|
| 225 | +
|
| 226 | +
|
| 227 | +## Run NooBaa NC inside a Container |
| 228 | +
|
| 229 | +This section provides instructions for running NooBaa NC (Non-Containerized) inside a container for testing and development purposes. |
| 230 | +
|
| 231 | +**Note for Mac Users**: This containerized approach is particularly useful for Mac users who want to run NooBaa NC locally, as it provides a Linux environment with systemd support that may not be available natively on macOS. |
| 232 | +
|
| 233 | +### 1. Start RHEL Container |
| 234 | +
|
| 235 | +Start a privileged RHEL container with root access: |
| 236 | +
|
| 237 | +```bash |
| 238 | +docker run --privileged --user root -d --platform=linux/amd64 registry.access.redhat.com/ubi9-init:latest |
| 239 | +``` |
| 240 | +
|
| 241 | +Get the container ID and access the container: |
| 242 | +
|
| 243 | +```bash |
| 244 | +docker exec -it <container_id> bash |
| 245 | +``` |
| 246 | +
|
| 247 | +### 2. Install Prerequisites |
| 248 | +
|
| 249 | +Install required packages: |
| 250 | +
|
| 251 | +```bash |
| 252 | +yum install -y wget make unzip less |
| 253 | +``` |
| 254 | +
|
| 255 | +Install Boost libraries (required for NooBaa): |
| 256 | +
|
| 257 | +```bash |
| 258 | +wget https://rpmfind.net/linux/centos-stream/9-stream/AppStream/x86_64/os/Packages/boost-system-1.75.0-8.el9.x86_64.rpm |
| 259 | +wget https://rpmfind.net/linux/centos-stream/9-stream/AppStream/x86_64/os/Packages/boost-thread-1.75.0-8.el9.x86_64.rpm |
| 260 | +rpm -i boost-system-1.75.0-8.el9.x86_64.rpm |
| 261 | +rpm -i boost-thread-1.75.0-8.el9.x86_64.rpm |
| 262 | +``` |
| 263 | +
|
| 264 | +### 3. Obtain NooBaa NC RPM — Download or Copy from Host |
| 265 | +
|
| 266 | +#### Option A: Install from Local Build |
| 267 | +
|
| 268 | +Copy a local NooBaa RPM to the container: |
| 269 | +
|
| 270 | +```bash |
| 271 | +docker cp noobaa.rpm <container_id>:noobaa.rpm |
| 272 | +``` |
| 273 | +
|
| 274 | +#### Option B: Download Latest Nightly Build |
| 275 | +
|
| 276 | +List latest nightly builds and download the el9.x86_64 RPM: |
| 277 | +
|
| 278 | +```bash |
| 279 | +aws s3api list-objects --bucket noobaa-core-rpms --no-sign-request --query 'reverse(sort_by(Contents, &LastModified))[:4].Key' |
| 280 | +wget https://noobaa-core-rpms.s3.us-east-1.amazonaws.com/noobaa-core-5.20.0-20250810-master.el9.x86_64.rpm |
| 281 | +``` |
| 282 | +
|
| 283 | +### 4. Install NooBaa NC RPM |
| 284 | +
|
| 285 | +Install the RPM and enable the service: |
| 286 | +
|
| 287 | +```bash |
| 288 | +rpm -iv noobaa.rpm |
| 289 | +systemctl enable noobaa --now |
| 290 | +``` |
| 291 | +
|
| 292 | +### 5. Configure Logging - |
| 293 | +
|
| 294 | +#### Journalctl |
| 295 | +
|
| 296 | +Configure systemd journal for better log handling: |
| 297 | +
|
| 298 | +```bash |
| 299 | +echo -e "RateLimitInterval=0\nRateLimitBurst=0" >> /etc/systemd/journald.conf |
| 300 | +systemctl restart systemd-journald |
| 301 | +``` |
| 302 | +
|
| 303 | +Capture NooBaa logs to a file: |
| 304 | +
|
| 305 | +```bash |
| 306 | +journalctl -u noobaa -f > apr27_1.logs |
| 307 | +``` |
| 308 | +
|
| 309 | +#### Syslog |
| 310 | +
|
| 311 | +**Recommended**: Configure syslog logging for better log management and centralized logging capabilities. |
| 312 | +
|
| 313 | +1. Install rsyslog: |
| 314 | +
|
| 315 | +```bash |
| 316 | +yum install rsyslog |
| 317 | +``` |
| 318 | +
|
| 319 | +2. Edit the NooBaa configuration file to enable syslog logging: |
| 320 | +
|
| 321 | +```bash |
| 322 | +vi /etc/noobaa.conf.d/config.json |
| 323 | +``` |
| 324 | +
|
| 325 | +patch `{ "LOG_TO_SYSLOG_ENABLED": true }` to the JSON configuration file. |
| 326 | +
|
| 327 | +3. Restart rsyslog service: |
| 328 | +
|
| 329 | +```bash |
| 330 | +systemctl restart rsyslog |
| 331 | +``` |
| 332 | +
|
| 333 | +4. Restart NooBaa service: |
| 334 | +
|
| 335 | +```bash |
| 336 | +systemctl restart noobaa |
| 337 | +``` |
| 338 | +
|
| 339 | +5. Verify logging by checking the log files: |
| 340 | +
|
| 341 | +```bash |
| 342 | +tail -f /var/log/noobaa.log |
| 343 | +tail -f /var/log/noobaa_events.log |
| 344 | +``` |
| 345 | +
|
| 346 | +### 5. Install Tools (optional) |
| 347 | +
|
| 348 | +#### AWS CLI |
| 349 | +
|
| 350 | +Install AWS CLI for S3 operations: |
| 351 | +
|
| 352 | +```bash |
| 353 | +curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" |
| 354 | +unzip awscliv2.zip |
| 355 | +./aws/install |
| 356 | +``` |
| 357 | +
|
| 358 | +#### Warp (Performance Testing Tool) |
| 359 | +
|
| 360 | +Install Warp for S3 performance testing: |
| 361 | +
|
| 362 | +```bash |
| 363 | +wget https://github.com/minio/warp/releases/download/v1.1.2/warp_Linux_x86_64.rpm |
| 364 | +rpm -iv warp_Linux_x86_64.rpm |
| 365 | +``` |
| 366 | +
|
| 367 | +Run Warp performance test: |
| 368 | +
|
| 369 | +```bash |
| 370 | +warp put --host=localhost:6443 \ |
| 371 | + --access-key=<access_key> \ |
| 372 | + --secret-key=<secret_key> \ |
| 373 | + --obj.size=1k \ |
| 374 | + --duration=1m \ |
| 375 | + --disable-multipart \ |
| 376 | + --bucket=<bucket-name> \ |
| 377 | + --tls \ |
| 378 | + --insecure \ |
| 379 | + --noclear \ |
| 380 | + --concurrent 1 |
| 381 | +``` |
| 382 | +
|
| 383 | +### Notes |
| 384 | +
|
| 385 | +- The container runs with `--privileged` flag to allow systemd services |
| 386 | +- Use `--platform=linux/amd64` for compatibility with x86_64 systems |
| 387 | +- Ensure the container has sufficient resources allocated |
| 388 | +- The NooBaa service will be accessible on port 6443 within the container |
| 389 | +
|
0 commit comments