Skip to content

Commit aace00e

Browse files
committed
feat(repo): add RepoProxy service for element repository management
Introduce the exordos_core.repo module providing a proxy layer over external element repositories (nginx HTTP and local bootstrap drivers) with refresh/sync, lazy element actualization, and version/dependency resolution. - Add DM models (Repository, RepoElement, RepoArtifact), driver specs, status enums and migration 0062-init-repo-tables - Implement AbstractProxyRepoDriver with Bootstrap and Nginx drivers - Add RepoProxyBuilderService and RepoElementBuilderService plus a universal agent driver translating resource ops into EM manifest lifecycle - Expose /v1/repo/ user API with repository refresh/upload and element install/uninstall/upgrade/edit actions - Add exordos-repo-proxy-gservice (cmd, systemd unit, install/bootstrap wiring, launchpad config) - Refactor bootstrap to provision elements via RepoProxy instead of direct EM manifest installation - Extend EM Manifest.install/upgrade to return the created Element and accept a session; simplify Manifest.uninstall filtering Signed-off-by: Anton Kremenetsky <anton.kremenetsky@gmail.com>
1 parent 6e96eba commit aace00e

45 files changed

Lines changed: 4851 additions & 72 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

etc/exordos_core/exordos_core.conf.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ initrd = http://{{ boot_ip }}:8080/bios/initrd.img
3636
kernel = http://{{ boot_ip }}:8080/bios/vmlinuz
3737

3838

39+
[launchpad]
40+
common_registrator_opts = exordos_core.cmd.repo_proxy_gservice:register_common_opts
41+
common_initializer = exordos_core.cmd.repo_proxy_gservice:init_common_conf
42+
services =
43+
exordos_core.repo.builders.repository:RepoProxyBuilderService,
44+
exordos_core.repo.builders.element:RepoElementBuilderService,
45+
exordos_core.repo.agents.universal.service:RepoElementAgentService
46+
3947
[events]
4048
enabled = False
4149
# client_type = async

etc/exordos_universal_agent/exordos_universal_agent.conf.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ capabilities =
2727
em_*,
2828
password,
2929
certificate,
30-
paas_lb_agent
30+
paas_lb_agent,
31+
repo_proxy_installed_element
3132

3233

3334
[CoreDNSCertificateCapabilityDriver]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Unit]
2+
Description=Exordos Repo Proxy General Service
3+
After=network-online.target
4+
5+
[Service]
6+
TimeoutStopSec=5
7+
Restart=always
8+
RestartSec=5s
9+
KillSignal=SIGINT
10+
ExecStart=exordos-repo-proxy-gservice --config-file /etc/exordos_core/exordos_core.conf --config-dir /etc/exordos_core/exordos_core.d
11+
12+
[Install]
13+
WantedBy=multi-user.target

exordos/exordos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ build:
4949

5050
# OS profile for the image
5151
profile: exordos_base
52-
profile_version: "1.1.4"
52+
profile_version: "1.2.1"
5353

5454
# Provisioning script
5555
script: images/install.sh

exordos/images/bootstrap.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ if [[ -n "$PERSISTENT_DISK" ]]; then
6969
cp "${PERSISTENT_MOUNT}/var/lib/exordos/data/etc/exordos_core/exordos_core.conf" /etc/exordos_core/exordos_core.conf
7070
fi
7171
fi
72+
sudo chown -R postgres:postgres /var/log/postgresql
7273
mkdir -p /var/lib/exordos/exordos_core
7374
migrate_to_persistent "/var/lib/exordos/exordos_core" "${PERSISTENT_MOUNT}/var/lib/exordos/exordos_core"
7475
mkdir -p /var/lib/exordos/data
@@ -151,6 +152,7 @@ sudo systemctl enable --now \
151152
ec-boot-api \
152153
ec-gservice \
153154
ec-core-agent \
155+
exordos-repo-proxy-gservice \
154156
exordos-universal-agent \
155157
exordos-universal-scheduler \
156158
pdns \

exordos/images/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ sudo ln -sf "$VENV_PATH/bin/ec-bootstrap-templates" "/usr/bin/ec-bootstrap-templ
192192
sudo ln -sf "$VENV_PATH/bin/exordos-universal-agent" "/usr/bin/exordos-universal-agent"
193193
sudo ln -sf "$VENV_PATH/bin/exordos-universal-agent-db-back" "/usr/bin/exordos-universal-agent-db-back"
194194
sudo ln -sf "$VENV_PATH/bin/exordos-universal-scheduler" "/usr/bin/exordos-universal-scheduler"
195+
sudo ln -sf "$VENV_PATH/bin/exordos-repo-proxy-gservice" "/usr/bin/exordos-repo-proxy-gservice"
195196

196197
# Install Systemd service files
197198
# The exordos services are enabled in the bootstrap
@@ -204,6 +205,7 @@ sudo cp "$GC_PATH/etc/systemd/ec-gservice.service" $SYSTEMD_SERVICE_DIR
204205
sudo cp "$GC_PATH/etc/systemd/ec-core-agent.service" $SYSTEMD_SERVICE_DIR
205206
sudo cp "$GC_PATH/etc/systemd/exordos-universal-agent.service" $SYSTEMD_SERVICE_DIR
206207
sudo cp "$GC_PATH/etc/systemd/exordos-universal-scheduler.service" $SYSTEMD_SERVICE_DIR
208+
sudo cp "$GC_PATH/etc/systemd/exordos-repo-proxy-gservice.service" $SYSTEMD_SERVICE_DIR
207209

208210
# Prepare DNSaaS
209211
sudo systemctl disable --now pdns dnsdist@public dnsdist@private

0 commit comments

Comments
 (0)