Selasa, 20 Mei 2025

REPO-dengan pulp

 

root@ubuntu:~#mkdir -p ~/pulp-backend-oci/{settings/certs,pulp_storage,pgsql,containers}

root@ubuntu:~#cd ~/pulp-backend-oci/

echo "

CONTENT_ORIGIN='http://$(hostname):8080'

ANSIBLE_API_HOSTNAME='http://$(hostname):8080'

ANSIBLE_CONTENT_HOSTNAME='http://$(hostname):8080/pulp/content'

" >> settings/settings.py

root@ubuntu:~/pulp-backend-oci# docker run --publish 8080:80   --name pulp   --volume "$(pwd)/settings":/etc/pulp   --volume "$(pwd)/pulp_storage":/var/lib/pulp   --volume "$(pwd)/pgsql":/var/lib/pgsql   --volume "$(pwd)/containers":/var/lib/containers   docker.io/pulp/pulp

root@ubuntu:~# git clone https://github.com/pulp/pulp-ui.git

Cloning into 'pulp-ui'...

remote: Enumerating objects: 3530, done.

remote: Counting objects: 100% (934/934), done.

remote: Compressing objects: 100% (511/511), done.

remote: Total 3530 (delta 699), reused 423 (delta 423), pack-reused 2596 (from 3)

Receiving objects: 100% (3530/3530), 3.85 MiB | 159.00 KiB/s, done.

Resolving deltas: 100% (2140/2140), done.

root@ubuntu:~# ls

pulp  pulp-backend-oci  pulpcli-venv  pulp-oci-images  pulp-ui  pulpui

root@ubuntu:~# cd pulp-ui/

root@ubuntu:~/pulp-ui# ls

CHANGES.md  config  cypress  cypress.config.js  cypress.env.json  Dockerfile  docs  eslint.config.mjs  LICENSE  lingui.config.js  locale  package.json  package-lock.json  pulp-ui-config.json  README.md  src  static  tsconfig.json

root@ubuntu:~/pulp-ui# npm install

npm WARN EBADENGINE Unsupported engine {

root@ubuntu:~/pulp-ui# curl -fsSL https://deb.nodesource.com/setup_20.x | bash -

apt-get install -y nodejs

2025-05-20 08:26:38 - Installing pre-requisites

root@ubuntu:~/pulp-ui# node -v

v20.19.2

root@ubuntu:~/pulp-ui# npm -v

10.8.2

root@ubuntu:~/pulp-ui# npm audit fix


up to date, audited 1223 packages in 3s


316 packages are looking for funding

  run `npm fund` for details


found 0 vulnerabilities

root@ubuntu:~/pulp-ui# npm run start


> pulp-ui@0.1.22 start

> NODE_ENV=development webpack serve --config config/start.config.js


<i> [webpack-dev-server] [HPM] Proxy created: /api/  -> http://localhost:8080


3. Gunakan pm2 (disarankan untuk production)

Jika kamu ingin manajemen proses yang lebih rapi:

bash
npm install -g pm2 pm2 start npm --name pulp-ui -- run start pm2 save

Cek status:

bash
pm2 status

=====================================================================

https://github.com/pulp/pulp-ui




5 months ago
5 months ago
5 months ago
7 months ago
5 months ago
4 months ago
8 months ago
5 months ago
11 months ago
11 months ago
11 months ago
7 months ago
7 months ago
7 months ago
11 months ago
4 months ago
8 months ago
11 months ago
7 months ago
5 months ago
5 months ago
5 months ago
5 months ago
2 months ago
2 months ago
7 months ago
5 months ago

pulp-ui

A community driven UI for Pulp.

How to run

backend

You can follow the pulp-oci-images quickstart, TLDR:

setup:

mkdir -p ~/pulp-backend-oci/{settings/certs,pulp_storage,pgsql,containers}
cd ~/pulp-backend-oci/
echo "
CONTENT_ORIGIN='http://$(hostname):8080'
ANSIBLE_API_HOSTNAME='http://$(hostname):8080'
ANSIBLE_CONTENT_HOSTNAME='http://$(hostname):8080/pulp/content'
" >> settings/settings.py

run:

cd ~/pulp-backend-oci/
podman run --publish 8080:80 \
           --replace --name pulp \
           --volume "$(pwd)/settings":/etc/pulp \
           --volume "$(pwd)/pulp_storage":/var/lib/pulp \
           --volume "$(pwd)/pgsql":/var/lib/pgsql \
           --volume "$(pwd)/containers":/var/lib/containers \
           docker.io/pulp/pulp

check:

curl localhost:8080/pulp/api/v3/status/ | jq

or open http://localhost:8080/pulp/api/v3/status/

change password:

podman exec -it pulp pulpcore-manager reset-admin-password --password admin
docker exec -it compose-pulp_api-1 pulpcore-manager reset-admin-password --password admin

configure pulp-cli:

pip install pulp-cli[pygments]
pulp config create --username admin --base-url http://localhost:8080 --password admin

pulp --help
pulp user list

frontend

npm install
npm run start

and open http://localhost:8002/ 🎉 :)

If your API listens elsewhere, you can use API_PROXY=http://elsewhere:12345 npm run start instead.

Misc

post-build configuration

The UI builds produced by npm run build can be further configured by serving a /pulp-ui-config.json alongside the built UI. (Note it has to be mapped at /, not just wherever index.html is served from.)

  • API_BASE_PATH - defaults to /pulp/api/v3/ - change when using domains or a different path
  • UI_BASE_PATH - defaults to /ui/ - change when only serving index in a subdirectory, or want different browser path prefix
  • UI_EXTERNAL_LOGIN_URI - defaults to nothing - set to something like /login/ when using an SSO
  • EXTRA_VERSION - an extra version string to display in about modal

Tidak ada komentar:

Posting Komentar