Initial commit
This commit is contained in:
commit
b1eabf0a89
18
.gitlab-ci.yml
Normal file
18
.gitlab-ci.yml
Normal file
@ -0,0 +1,18 @@
|
||||
stages:
|
||||
- build
|
||||
|
||||
build-image:
|
||||
stage: build
|
||||
image: repo.nstart.local/nstart/docker-cli-buildx:1.0.0
|
||||
services:
|
||||
- name: repo.nstart.local/nstart/docker-dind-ca:1.0.0
|
||||
alias: docker
|
||||
command: ["--tls=false"]
|
||||
variables:
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- echo $REGISTRY_PASSWORD | docker login -u $REGISTRY_USER --password-stdin $REGISTRY
|
||||
- docker bake all --no-cache --push
|
||||
only:
|
||||
- master
|
||||
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM repo.nstart.local/nstart/gradle:jdk17-noble
|
||||
|
||||
COPY ispras/ispras-archive-keyring.gpg /usr/share/keyrings/ispras-archive-keyring.gpg
|
||||
COPY ispras/ispras.list /etc/apt/sources.list.d/ispras.list
|
||||
COPY ./hasplm-recepient.ini /etc/hasplm/hasplm.ini
|
||||
|
||||
RUN <<EOF
|
||||
set -eux
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --install-recommends svace svacer
|
||||
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
EOF
|
||||
|
||||
COPY --chmod=0755 ./svace /usr/local/bin/svace
|
||||
75
docker-bake.hcl
Normal file
75
docker-bake.hcl
Normal file
@ -0,0 +1,75 @@
|
||||
variable "registry" {
|
||||
default = "repo.nstart.local"
|
||||
}
|
||||
|
||||
variable "VERSION" {
|
||||
default = "1.0.11"
|
||||
}
|
||||
|
||||
variable "EXPORT_TYPE" {
|
||||
default = "oci"
|
||||
}
|
||||
|
||||
function "oci_labels" {
|
||||
params = [name]
|
||||
result = {
|
||||
"org.opencontainers.image.version" = VERSION,
|
||||
"org.opencontainers.image.vendor" = "New Start",
|
||||
"org.opencontainers.image.authors" = "Sychev Nikita <sychev.na@nstart.space>",
|
||||
}
|
||||
}
|
||||
|
||||
function "image_ref" {
|
||||
params = [name]
|
||||
result = registry != "" ? "${registry}/nstart/${name}" : "nstart/${name}"
|
||||
}
|
||||
|
||||
target "common" {
|
||||
platforms = ["linux/amd64"]
|
||||
|
||||
output = ["type=image"]
|
||||
|
||||
attest = [
|
||||
"type=sbom,generator=${registry}/docker/buildkit-syft-scanner:stable-1",
|
||||
"type=provenance,mode=max"
|
||||
]
|
||||
}
|
||||
|
||||
target "svace" {
|
||||
matrix = { combo = [ { name = "svace" } ] }
|
||||
|
||||
inherits = ["common"]
|
||||
context = "."
|
||||
dockerfile = "Dockerfile"
|
||||
|
||||
tags = [
|
||||
"${image_ref(combo.name)}:${VERSION}",
|
||||
"${image_ref(combo.name)}:latest"
|
||||
]
|
||||
|
||||
labels = merge(
|
||||
oci_labels(combo.name),
|
||||
{
|
||||
"org.opencontainers.image.base.name" = "${registry}/library/nginx:1.29.1-alpine"
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
target "save" {
|
||||
matrix = {
|
||||
combo = [
|
||||
{ name = "svace_save", svc = "svace" }
|
||||
]
|
||||
}
|
||||
|
||||
name = combo.name
|
||||
inherits = [combo.svc]
|
||||
|
||||
output = [
|
||||
"type=${EXPORT_TYPE},dest=./dist/nstart-${combo.svc}-${VERSION}.tar"
|
||||
]
|
||||
}
|
||||
|
||||
group "all" {
|
||||
targets = ["svace"]
|
||||
}
|
||||
72
hasplm-recepient.ini
Normal file
72
hasplm-recepient.ini
Normal file
@ -0,0 +1,72 @@
|
||||
;*************************************************************************
|
||||
;*
|
||||
;* Sentinel License Manager configuration file
|
||||
;*
|
||||
;* Version 29.3 1.147349 at svace-test-recipient
|
||||
;*
|
||||
;*
|
||||
;*************************************************************************
|
||||
[SERVER]
|
||||
name = svace-test-recipient
|
||||
certificate =
|
||||
privatekey =
|
||||
identity_storage_encrypt = no
|
||||
pagerefresh = 3
|
||||
linesperpage = 12
|
||||
accremote = 1
|
||||
adminremote = 1
|
||||
enablehaspc2v = 0
|
||||
old_files_delete_days = 90
|
||||
|
||||
enabledetach = 0
|
||||
enableautodetach = 0
|
||||
autodetachhours = 2
|
||||
reservedseats = 0
|
||||
reservedpercent = 0
|
||||
detachmaxdays = 14
|
||||
commuter_delete_days = 7
|
||||
disable_um = 0
|
||||
idle_session_timeout_mins = 720
|
||||
|
||||
requestlog = 0
|
||||
loglocal = 0
|
||||
logremote = 0
|
||||
logadmin = 0
|
||||
errorlog = 1
|
||||
rotatelogs = 0
|
||||
access_log_maxsize = 0
|
||||
error_log_maxsize = 0
|
||||
zip_logs_days = 0
|
||||
delete_logs_days = 0
|
||||
pidfile = 0
|
||||
passacc = 0
|
||||
|
||||
accessfromremote = anyone
|
||||
accesstoremote = 1
|
||||
bind_local_only = 0
|
||||
id_public_addr =
|
||||
proxy = 0
|
||||
proxy_host =
|
||||
proxy_port = 8080
|
||||
proxy_username =
|
||||
proxy_password =
|
||||
|
||||
[REMOTE]
|
||||
broadcastsearch = 1
|
||||
serversearchinterval = 30
|
||||
serveraddr = 192.168.101.11
|
||||
|
||||
[ACCESS]
|
||||
|
||||
[USERS]
|
||||
|
||||
[VENDORS]
|
||||
|
||||
[EMS]
|
||||
emsurl = http://localhost:8080
|
||||
emsurl = http://127.0.0.1:8080
|
||||
|
||||
[TRUST]
|
||||
|
||||
[LOGPARAMETERS]
|
||||
text = {timestamp} {clientaddr}:{clientport} {clientid} {method} {url} {function}({functionparams}) result({statuscode}) {newline}
|
||||
BIN
ispras/ispras-archive-keyring.gpg
Normal file
BIN
ispras/ispras-archive-keyring.gpg
Normal file
Binary file not shown.
1
ispras/ispras.list
Normal file
1
ispras/ispras.list
Normal file
@ -0,0 +1 @@
|
||||
deb [signed-by=/usr/share/keyrings/ispras-archive-keyring.gpg] https://repo.ispras.ru/apt /
|
||||
26
svace
Normal file
26
svace
Normal file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
HASP_BIN="/usr/sbin/hasplmd_x86_64"
|
||||
HASP_PROC="hasplmd_x86_64"
|
||||
REAL_BIN="/usr/bin/svace"
|
||||
|
||||
if [[ ! -x "$REAL_BIN" ]]; then
|
||||
echo "ERROR: real svace binary not found: $REAL_BIN" >&2
|
||||
exit 127
|
||||
fi
|
||||
|
||||
if [[ -x "$HASP_BIN" ]]; then
|
||||
if ! pgrep -x "$HASP_PROC" >/dev/null 2>&1; then
|
||||
"$HASP_BIN" -s
|
||||
|
||||
if ! pgrep -x "$HASP_PROC" >/dev/null 2>&1; then
|
||||
echo "ERROR: failed to start $HASP_PROC via $HASP_BIN -s" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "WARNING: $HASP_BIN not found" >&2
|
||||
fi
|
||||
|
||||
exec "$REAL_BIN" "$@"
|
||||
Loading…
x
Reference in New Issue
Block a user