Compare commits
6 Commits
a829135921
...
61d93d4737
| Author | SHA1 | Date |
|---|---|---|
|
|
61d93d4737 | |
|
|
c763882833 | |
|
|
7daad8373d | |
|
|
6452307d77 | |
|
|
92ab9966d5 | |
|
|
32b3b58a6b |
|
|
@ -1,4 +1,4 @@
|
||||||
This is a Vagrant Environment for a [Nexus Repository OSS](https://github.com/sonatype/nexus-public) service.
|
This is a Vagrant Environment for a [Nexus Repository Community Edition (CE)](https://github.com/sonatype/nexus-public) service.
|
||||||
|
|
||||||
This will:
|
This will:
|
||||||
|
|
||||||
|
|
@ -155,7 +155,7 @@ You can also access the database cli shell as:
|
||||||
sudo su -l # switch to the root user.
|
sudo su -l # switch to the root user.
|
||||||
systemctl stop nexus # make sure nexus is not running while you use the database.
|
systemctl stop nexus # make sure nexus is not running while you use the database.
|
||||||
su -s /bin/bash nexus # switch to the nexus user.
|
su -s /bin/bash nexus # switch to the nexus user.
|
||||||
nexus_home=/opt/nexus/nexus-3.82.0-08 # make sure you have the correct version here.
|
nexus_home=/opt/nexus/nexus-3.83.2-01 # make sure you have the correct version here.
|
||||||
nexus_data="$(realpath $nexus_home/../sonatype-work/nexus3)"
|
nexus_data="$(realpath $nexus_home/../sonatype-work/nexus3)"
|
||||||
function h2-shell {
|
function h2-shell {
|
||||||
java \
|
java \
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ build==1.3.0
|
||||||
certifi==2025.8.3
|
certifi==2025.8.3
|
||||||
cffi==1.17.1
|
cffi==1.17.1
|
||||||
charset-normalizer==3.4.3
|
charset-normalizer==3.4.3
|
||||||
cryptography==45.0.6
|
cryptography==45.0.7
|
||||||
docutils==0.22
|
docutils==0.22
|
||||||
id==1.5.0
|
id==1.5.0
|
||||||
idna==3.10
|
idna==3.10
|
||||||
|
|
@ -15,7 +15,7 @@ jeepney==0.9.0
|
||||||
keyring==25.6.0
|
keyring==25.6.0
|
||||||
markdown-it-py==4.0.0
|
markdown-it-py==4.0.0
|
||||||
mdurl==0.1.2
|
mdurl==0.1.2
|
||||||
more-itertools==10.7.0
|
more-itertools==10.8.0
|
||||||
nh3==0.3.0
|
nh3==0.3.0
|
||||||
packaging==25.0
|
packaging==25.0
|
||||||
pycparser==2.22
|
pycparser==2.22
|
||||||
|
|
@ -28,7 +28,7 @@ rfc3986==2.0.0
|
||||||
rich==14.1.0
|
rich==14.1.0
|
||||||
SecretStorage==3.3.3
|
SecretStorage==3.3.3
|
||||||
tomli==2.2.1
|
tomli==2.2.1
|
||||||
twine==6.1.0
|
twine==6.2.0
|
||||||
typing_extensions==4.14.1
|
typing_extensions==4.15.0
|
||||||
urllib3==2.5.0
|
urllib3==2.5.0
|
||||||
zipp==3.23.0
|
zipp==3.23.0
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ set -euxo pipefail
|
||||||
|
|
||||||
# see https://github.com/moby/moby/releases
|
# see https://github.com/moby/moby/releases
|
||||||
# renovate: datasource=github-releases depName=moby/moby
|
# renovate: datasource=github-releases depName=moby/moby
|
||||||
default_docker_version='28.3.3'
|
default_docker_version='28.4.0'
|
||||||
|
|
||||||
# see https://github.com/moby/moby/releases
|
# see https://github.com/moby/moby/releases
|
||||||
docker_version="${1:-$default_docker_version}"; shift || true
|
docker_version="${1:-$default_docker_version}"; shift || true
|
||||||
|
|
|
||||||
|
|
@ -35,19 +35,20 @@ pushd /opt/nexus
|
||||||
# see https://help.sonatype.com/repomanager3/product-information/download/download-archives---repository-manager-3
|
# see https://help.sonatype.com/repomanager3/product-information/download/download-archives---repository-manager-3
|
||||||
# see https://help.sonatype.com/repomanager3/product-information/release-notes
|
# see https://help.sonatype.com/repomanager3/product-information/release-notes
|
||||||
# see https://help.sonatype.com/repomanager3
|
# see https://help.sonatype.com/repomanager3
|
||||||
nexus_version=3.82.0-08
|
nexus_version=3.83.2-01
|
||||||
nexus_home=/opt/nexus/nexus-$nexus_version
|
nexus_home=/opt/nexus/nexus-$nexus_version
|
||||||
nexus_tarball=nexus-$nexus_version-linux-x86_64.tar.gz
|
nexus_tarball=nexus-$nexus_version-linux-x86_64.tar.gz
|
||||||
nexus_download_url=https://download.sonatype.com/nexus/3/$nexus_tarball
|
nexus_download_url=https://download.sonatype.com/nexus/3/$nexus_tarball
|
||||||
wget -q $nexus_download_url
|
wget -q $nexus_download_url
|
||||||
tar xf $nexus_tarball # NB this creates the $nexus_home (e.g. nexus-3.82.0-08) and sonatype-work directories.
|
tar xf $nexus_tarball # NB this creates the $nexus_home (e.g. nexus-3.83.2-01) and sonatype-work directories.
|
||||||
rm $nexus_tarball
|
rm $nexus_tarball
|
||||||
|
sed -i -E 's,#!.+,#!/usr/bin/bash,g' "$nexus_home/bin/nexus"
|
||||||
install -d -o nexus -g nexus -m 700 .java # java preferences are saved here (the default java.util.prefs.userRoot preference).
|
install -d -o nexus -g nexus -m 700 .java # java preferences are saved here (the default java.util.prefs.userRoot preference).
|
||||||
install -d -o nexus -g nexus -m 700 sonatype-work/nexus3/etc
|
install -d -o nexus -g nexus -m 700 sonatype-work/nexus3/etc
|
||||||
chown -R nexus:nexus sonatype-work
|
chown -R nexus:nexus sonatype-work
|
||||||
grep -v -E '\s*##.*' $nexus_home/etc/nexus-default.properties >sonatype-work/nexus3/etc/nexus.properties
|
grep -v -E '\s*##.*' $nexus_home/etc/nexus-default.properties >sonatype-work/nexus3/etc/nexus.properties
|
||||||
sed -i -E 's,(application-host=).+,\1127.0.0.1,g' sonatype-work/nexus3/etc/nexus.properties
|
sed -i -E 's,(application-host=).+,\1127.0.0.1,g' sonatype-work/nexus3/etc/nexus.properties
|
||||||
sed -i -E 's,nexus-pro-,nexus-oss-,g' sonatype-work/nexus3/etc/nexus.properties
|
sed -i -E '/^(\s*(nexus-edition=.+|nexus-features=.+|nexus-pro-feature)\s*)/d' sonatype-work/nexus3/etc/nexus.properties
|
||||||
cat >>sonatype-work/nexus3/etc/nexus.properties <<'EOF'
|
cat >>sonatype-work/nexus3/etc/nexus.properties <<'EOF'
|
||||||
|
|
||||||
# disable the wizard.
|
# disable the wizard.
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ binaries: binaries-download
|
||||||
|
|
||||||
binaries-download:
|
binaries-download:
|
||||||
mkdir -p binaries
|
mkdir -p binaries
|
||||||
wget -qO- https://download.sonatype.com/nexus/3/nexus-3.82.0-08-unix.tar.gz \
|
wget -qO- https://download.sonatype.com/nexus/3/nexus-3.83.2-01-unix.tar.gz \
|
||||||
| tar xzf - --strip-components 1 -C binaries
|
| tar xzf - --strip-components 1 -C binaries
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<nx-version>3.82.0-08</nx-version>
|
<nx-version>3.83.2-01</nx-version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ mkdir -p tmp/use-docker-repository && cd tmp/use-docker-repository
|
||||||
|
|
||||||
# see https://github.com/golang/go/tags
|
# see https://github.com/golang/go/tags
|
||||||
# renovate: datasource=github-tags depName=golang/go extractVersion=go(?<version>.+)
|
# renovate: datasource=github-tags depName=golang/go extractVersion=go(?<version>.+)
|
||||||
go_version='1.25.0'
|
go_version='1.25.1'
|
||||||
|
|
||||||
cat >main.go <<'EOF'
|
cat >main.go <<'EOF'
|
||||||
package main
|
package main
|
||||||
|
|
@ -68,7 +68,7 @@ module example.com/go-hello
|
||||||
go $go_version
|
go $go_version
|
||||||
EOF
|
EOF
|
||||||
cat >Dockerfile <<EOF
|
cat >Dockerfile <<EOF
|
||||||
FROM golang:$go_version-bookworm as builder
|
FROM golang:$go_version-bookworm AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY go.* main.go ./
|
COPY go.* main.go ./
|
||||||
RUN CGO_ENABLED=0 go build -ldflags="-s"
|
RUN CGO_ENABLED=0 go build -ldflags="-s"
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ rootProject.name = 'gradle-greeter-application'
|
||||||
EOF
|
EOF
|
||||||
# see https://mvnrepository.com/artifact/com.gradleup.shadow/shadow-gradle-plugin
|
# see https://mvnrepository.com/artifact/com.gradleup.shadow/shadow-gradle-plugin
|
||||||
# renovate: datasource=maven depName=com.gradleup.shadow:shadow-gradle-plugin
|
# renovate: datasource=maven depName=com.gradleup.shadow:shadow-gradle-plugin
|
||||||
com_gradleup_shadow_version='9.0.2'
|
com_gradleup_shadow_version='9.1.0'
|
||||||
cat >build.gradle <<EOF
|
cat >build.gradle <<EOF
|
||||||
// see https://docs.gradle.org/9.0.0/userguide/java_plugin.html
|
// see https://docs.gradle.org/9.0.0/userguide/java_plugin.html
|
||||||
// see https://docs.gradle.org/9.0.0/userguide/application_plugin.html
|
// see https://docs.gradle.org/9.0.0/userguide/application_plugin.html
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,12 @@ npm --version
|
||||||
|
|
||||||
# configure npm to trust our system trusted CAs.
|
# configure npm to trust our system trusted CAs.
|
||||||
# NB never turn off ssl verification with npm config set strict-ssl false
|
# NB never turn off ssl verification with npm config set strict-ssl false
|
||||||
npm config set cafile /etc/ssl/certs/ca-certificates.crt
|
# NB since node.js 22.19.0 we no longer need to use npm config set cafile to use
|
||||||
|
# a private ca. instead, either set the NODE_USE_SYSTEM_CA environment
|
||||||
|
# variable or use the --use-system-ca command line option.
|
||||||
|
# see https://github.com/nodejs/node/pull/59276
|
||||||
|
# see https://nodejs.org/docs/latest-v22.x/api/cli.html#--use-system-ca
|
||||||
|
export NODE_USE_SYSTEM_CA='1'
|
||||||
|
|
||||||
#
|
#
|
||||||
# configure npm to use the npm-group repository.
|
# configure npm to use the npm-group repository.
|
||||||
|
|
@ -36,6 +41,7 @@ cat >package.json <<'EOF'
|
||||||
"description": "the classic hello world",
|
"description": "the classic hello world",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"main": "hello-world.js",
|
"main": "hello-world.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
@ -45,10 +51,11 @@ cat >package.json <<'EOF'
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
cat >hello-world.js <<'EOF'
|
cat >hello-world.js <<'EOF'
|
||||||
const leftPad = require('left-pad')
|
import chalk from 'chalk';
|
||||||
console.log(leftPad('hello world', 40))
|
|
||||||
|
console.log(chalk.green('Hello, World!'));
|
||||||
EOF
|
EOF
|
||||||
npm install --save left-pad
|
npm install --save chalk
|
||||||
node hello-world.js
|
node hello-world.js
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -60,7 +67,7 @@ export NPM_PASS=password
|
||||||
export NPM_EMAIL=alice.doe@example.com
|
export NPM_EMAIL=alice.doe@example.com
|
||||||
export NPM_REGISTRY=https://$nexus_domain/repository/npm-hosted/
|
export NPM_REGISTRY=https://$nexus_domain/repository/npm-hosted/
|
||||||
npm install npm-registry-client@8.6.0
|
npm install npm-registry-client@8.6.0
|
||||||
npm_auth_token=$(NODE_PATH=$PWD/node_modules node --use-openssl-ca /vagrant/provision/npm-login.js 2>/dev/null)
|
npm_auth_token=$(NODE_PATH=$PWD/node_modules node /vagrant/provision/npm-login.js 2>/dev/null)
|
||||||
npm set //$nexus_domain/repository/npm-hosted/:_authToken $npm_auth_token
|
npm set //$nexus_domain/repository/npm-hosted/:_authToken $npm_auth_token
|
||||||
|
|
||||||
# publish.
|
# publish.
|
||||||
|
|
@ -78,6 +85,7 @@ cat >package.json <<'EOF'
|
||||||
"description": "use the classic hello world",
|
"description": "use the classic hello world",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.example.com/use-hello-world.git"
|
"url": "https://git.example.com/use-hello-world.git"
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
# dump all the windows trusted roots into a ca file.
|
|
||||||
$pems = New-Object System.Text.StringBuilder
|
|
||||||
Get-ChildItem Cert:\LocalMachine\Root | ForEach-Object {
|
|
||||||
# $_ is-a System.Security.Cryptography.X509Certificates.X509Certificate2
|
|
||||||
Write-Host "Exporting the $($_.Issuer) certificate..."
|
|
||||||
[void]$pems.AppendLine('-----BEGIN CERTIFICATE-----')
|
|
||||||
[void]$pems.AppendLine(
|
|
||||||
[Convert]::ToBase64String(
|
|
||||||
$_.Export('Cert'),
|
|
||||||
'InsertLineBreaks'));
|
|
||||||
[void]$pems.AppendLine("-----END CERTIFICATE-----");
|
|
||||||
}
|
|
||||||
Set-Content `
|
|
||||||
-Encoding Ascii `
|
|
||||||
C:\ProgramData\ca-certificates.crt `
|
|
||||||
$pems.ToString()
|
|
||||||
|
|
@ -30,16 +30,20 @@ Set-Location tmp/use-npm-repository
|
||||||
|
|
||||||
# install node LTS.
|
# install node LTS.
|
||||||
# see https://community.chocolatey.org/packages/nodejs-lts
|
# see https://community.chocolatey.org/packages/nodejs-lts
|
||||||
choco install -y nodejs-lts --version 22.18.0
|
choco install -y nodejs-lts --version 22.19.0
|
||||||
Import-Module C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1
|
Import-Module C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1
|
||||||
Update-SessionEnvironment
|
Update-SessionEnvironment
|
||||||
node --version
|
node --version
|
||||||
npm --version
|
npm --version
|
||||||
|
|
||||||
# configure npm to trust our system trusted CAs.
|
# configure node/npm to trust our system trusted CAs.
|
||||||
# NB never turn off ssl verification with npm config set strict-ssl false
|
# NB never turn off ssl verification with npm config set strict-ssl false
|
||||||
c:\vagrant\provision\windows\export-windows-ca-certificates.ps1
|
# NB since node.js 22.19.0 we no longer need to use npm config set cafile to use
|
||||||
npm config set cafile c:/ProgramData/ca-certificates.crt
|
# a private ca. instead, either set the NODE_USE_SYSTEM_CA environment
|
||||||
|
# variable or use the --use-system-ca command line option.
|
||||||
|
# see https://github.com/nodejs/node/pull/59276
|
||||||
|
# see https://nodejs.org/docs/latest-v22.x/api/cli.html#--use-system-ca
|
||||||
|
$env:NODE_USE_SYSTEM_CA='1'
|
||||||
|
|
||||||
#
|
#
|
||||||
# configure npm to use the npm-group repository.
|
# configure npm to use the npm-group repository.
|
||||||
|
|
@ -58,6 +62,7 @@ Set-Content `
|
||||||
"description": "the classic hello world",
|
"description": "the classic hello world",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"main": "hello-world-win.js",
|
"main": "hello-world-win.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
@ -70,10 +75,11 @@ Set-Content `
|
||||||
-Encoding Ascii `
|
-Encoding Ascii `
|
||||||
hello-world-win.js `
|
hello-world-win.js `
|
||||||
@'
|
@'
|
||||||
const leftPad = require('left-pad')
|
import chalk from 'chalk';
|
||||||
console.log(leftPad('hello world', 40))
|
|
||||||
|
console.log(chalk.green('Hello, World!'));
|
||||||
'@
|
'@
|
||||||
npm install --save left-pad
|
npm install --save chalk
|
||||||
node hello-world-win.js
|
node hello-world-win.js
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -86,8 +92,7 @@ $env:NPM_EMAIL='alice.doe@example.com'
|
||||||
$env:NPM_REGISTRY="https://$nexusDomain/repository/npm-hosted/"
|
$env:NPM_REGISTRY="https://$nexusDomain/repository/npm-hosted/"
|
||||||
npm install npm-registry-client@8.6.0
|
npm install npm-registry-client@8.6.0
|
||||||
$env:NODE_PATH="$PWD/node_modules"
|
$env:NODE_PATH="$PWD/node_modules"
|
||||||
$env:NODE_EXTRA_CA_CERTS='C:\ProgramData\ca-certificates.crt'
|
$npmAuthToken = node /vagrant/provision/npm-login.js 2>$null
|
||||||
$npmAuthToken = node --use-openssl-ca /vagrant/provision/npm-login.js 2>$null
|
|
||||||
npm set "//$nexusDomain/repository/npm-hosted/:_authToken" $npmAuthToken
|
npm set "//$nexusDomain/repository/npm-hosted/:_authToken" $npmAuthToken
|
||||||
|
|
||||||
# publish.
|
# publish.
|
||||||
|
|
@ -101,13 +106,14 @@ mkdir use-hello-world-win-npm | Out-Null
|
||||||
Push-Location use-hello-world-win-npm
|
Push-Location use-hello-world-win-npm
|
||||||
Set-Content `
|
Set-Content `
|
||||||
-Encoding Ascii `
|
-Encoding Ascii `
|
||||||
hello-world-win.js `
|
package.json `
|
||||||
@'
|
@'
|
||||||
{
|
{
|
||||||
"name": "use-hello-world-win",
|
"name": "use-hello-world-win",
|
||||||
"description": "use the classic hello world",
|
"description": "use the classic hello world",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.example.com/use-hello-world-win.git"
|
"url": "https://git.example.com/use-hello-world-win.git"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ gitea_version='1.24.5'
|
||||||
# see https://hub.docker.com/r/renovate/renovate/tags
|
# see https://hub.docker.com/r/renovate/renovate/tags
|
||||||
# see https://github.com/renovatebot/renovate/releases
|
# see https://github.com/renovatebot/renovate/releases
|
||||||
# renovate: datasource=docker depName=renovate/renovate
|
# renovate: datasource=docker depName=renovate/renovate
|
||||||
renovate_version='41.82.8'
|
renovate_version='41.97.7'
|
||||||
|
|
||||||
# clean.
|
# clean.
|
||||||
echo 'Deleting existing Gitea...'
|
echo 'Deleting existing Gitea...'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue