Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .downloads

This file was deleted.

6 changes: 0 additions & 6 deletions .final_builds/jobs/nexus-backup/index.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .final_builds/jobs/nexus-repo/index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
builds:
192c143a5c80c01c8304a9f4b422c142fa8b43ee76150840927b68a97d97a3b4:
version: 192c143a5c80c01c8304a9f4b422c142fa8b43ee76150840927b68a97d97a3b4
blobstore_id: 45107c98-3716-4dff-547a-853e55ce3531
sha1: sha256:972b79fe3c2d1f2996983fb1be38df30bcf46a2a3120daf8842e65c9d711075f
643f6c0d1ff6135caf079b3d699a9562e2ac2d0722690e7890d1ab73db670f2d:
version: 643f6c0d1ff6135caf079b3d699a9562e2ac2d0722690e7890d1ab73db670f2d
blobstore_id: cbe0da74-4d00-4ba0-7e5f-a43352b930b8
sha1: sha256:042f09d33c99bf25f1d50cecd903a7810202ac35c177b69b1ad465fe4608a9ba
c067157755b49675615b2e26ac4c807fb0741b24540a9ba7ec426c5a2004b8d5:
version: c067157755b49675615b2e26ac4c807fb0741b24540a9ba7ec426c5a2004b8d5
blobstore_id: e33c0708-3988-44cc-66b5-d583115d72da
sha1: sha256:b22e7f70c2ff9552ecf0d3b5bc28540c8ec5db1d5e67988427a212559e51d463
f45c5211df3fb2f9e5607a4f1ebbdb4ededfa8eeae51aa6d27f8d46c5d79e10e:
version: f45c5211df3fb2f9e5607a4f1ebbdb4ededfa8eeae51aa6d27f8d46c5d79e10e
blobstore_id: 8515404d-1265-42b8-506e-81250a4b6933
sha1: sha256:3bee54e0696553756f2a211184842b27c54d58b810938a00cb941907778770aa
format-version: "2"
6 changes: 0 additions & 6 deletions .final_builds/jobs/nexus/index.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .final_builds/license/index.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
builds:
ae18946b5cd7a9a88e62de3230d811980fa47606843e45b52990c198e2f267b5:
version: ae18946b5cd7a9a88e62de3230d811980fa47606843e45b52990c198e2f267b5
blobstore_id: 14d43ef3-327c-4f46-5cf6-b383f59d7cee
sha1: sha256:bbc1805a7fb4c1b36cc6b8b8c7c1c18122dc947a28376787f6fa6b64bf8d9f8c
blobstore_id: 6d76ea1a-d334-4a95-59f9-c395f3998ca2
sha1: sha256:1c743c45ac8c4c00c7ac768dca16c32a598bf4b84b3e92a5ba35542a1806bed7
format-version: "2"
10 changes: 10 additions & 0 deletions .final_builds/packages/common/index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
builds:
c00054c000a56259096ddbcbe08b756b6cc0be6c4e3b8b0e06deccf893746997:
version: c00054c000a56259096ddbcbe08b756b6cc0be6c4e3b8b0e06deccf893746997
blobstore_id: edda2a7c-311d-46c3-49ce-21295d7a9f54
sha1: sha256:1c6bd6f7097ab4c6f0135c20bafad4e3118822a42c1ca70ed3dc85bc73d05d29
c177dd2d320f2124f0bca3e1eb41225922ca1999bba0261741d9220332dd8bf0:
version: c177dd2d320f2124f0bca3e1eb41225922ca1999bba0261741d9220332dd8bf0
blobstore_id: 16eb4bd1-928d-4f41-5c08-6c227c25b8d7
sha1: sha256:237ee97e17e78723414d938f70aaba4a4244c9fd309fad3160a580e9d9d09671
format-version: "2"
22 changes: 22 additions & 0 deletions .final_builds/packages/nexus-repo/index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
builds:
2a89b1560c719d0df2a677ca6c5d06bf87ce3c4f70330213d1c5cf7882f4a678:
version: 2a89b1560c719d0df2a677ca6c5d06bf87ce3c4f70330213d1c5cf7882f4a678
blobstore_id: e9a30af0-05b1-4cc8-6109-4bb84b7c04bc
sha1: sha256:b36de41b3651c442125b681bbb17f8471e264c4f20b50be4d56f3479d6bebdcb
3dcea549719012002958b6aedb2338350f22e4e99a0b954fc3d23078a26f7c62:
version: 3dcea549719012002958b6aedb2338350f22e4e99a0b954fc3d23078a26f7c62
blobstore_id: 62ced52e-5f73-465e-517f-09fadeb728eb
sha1: sha256:4b19b58bf3f580c2bfc59d26e7089fa81bc8f7afebb36aac0f5761dbdbcea9fe
71eec68c02b78f703529f75c2fde388d496097070f2fc5b188a2261ab98504ea:
version: 71eec68c02b78f703529f75c2fde388d496097070f2fc5b188a2261ab98504ea
blobstore_id: fc818c11-f8fa-46d1-6107-2f43010e488f
sha1: sha256:fa83fbe4f5906db18c0fe3bdf2b4259f72d3a8504ac9caef739a9367a7a940f8
a184fcee77a470631f5a2a81fb73a5017e922d916953d4f19cf7b6bb9a99c00f:
version: a184fcee77a470631f5a2a81fb73a5017e922d916953d4f19cf7b6bb9a99c00f
blobstore_id: e05a97ff-e531-4776-5c3e-b19d859404bd
sha1: sha256:6996f206c3319dacfb487deb215ffe72f18b84df1f7fbab900e54d1c36da65ca
eff089c316a19db386443044c7a64a7ffdeac149e40d295bf8ee620aa30a98d8:
version: eff089c316a19db386443044c7a64a7ffdeac149e40d295bf8ee620aa30a98d8
blobstore_id: bcfd78e4-f5e7-443e-49fe-c7b439955ec1
sha1: sha256:c9a78b7b203505a1226d6c42671395499005668b3a194795a00e6dbbaa9f4f9e
format-version: "2"
6 changes: 0 additions & 6 deletions .final_builds/packages/nexus-scripts/index.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .final_builds/packages/nexus/index.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .final_builds/packages/openjdk-17/index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
builds:
8d330e8a9946c5c89bdf35c571d4ea23573228c5a92881f9aaf4253740a8f87e:
version: 8d330e8a9946c5c89bdf35c571d4ea23573228c5a92881f9aaf4253740a8f87e
blobstore_id: b5a76125-f651-4953-7474-ee25f3db9acc
sha1: sha256:6d4e3e84894781786b7d0526faffc89131825c69c53921eff85ab70fddf103a8
format-version: "2"
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ blobs
.DS_Store
.final_builds/jobs/**/*.tgz
.final_builds/packages/**/*.tgz
.temp
.tmp
.download
.downloads
*.swp
*~
*#
Expand All @@ -22,4 +26,5 @@ credentials.yml
*.cert
*.key
*.p12
creds.yml
creds.yml
prv-notes.md
1 change: 0 additions & 1 deletion .sha1/0.10.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.10.1

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.11.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.12.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.12.1

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.13.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.14.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.14.1

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.15.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.4.1

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.5.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.5.1

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.6.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.7.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.7.1

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.8.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.9.0

This file was deleted.

1 change: 0 additions & 1 deletion .sha1/0.9.1

This file was deleted.

221 changes: 36 additions & 185 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,196 +1,47 @@
# BOSH Release for Nexus Repository Manager

## How to deploy nexus-boshrelease
Forked from [making/nexus-boshrelease](https://github.com/making/nexus-boshrelease), thanks!

A sample manifest is following:
Nexus Repository and Java versions: [blobs-versions.env](src/meta-info/blobs-versions.env)

``` yml
---
name: nexus

releases:
- name: nexus
version: 0.12.0
url: https://github.com/making/nexus-boshrelease/releases/download/0.12.0/nexus-boshrelease-0.12.0.tgz
sha1: 09debef2e945a905e089b8d7c445df4d0b32f4e6
- name: openjdk
version: 8.0.1
url: https://github.com/making/openjdk-boshrelease/releases/download/8.0.1/openjdk-boshrelease-8.0.1.tgz
sha1: d02566fb6d974de4b60bf44dc21e56422c7da3fd

stemcells:
- alias: xenial
os: ubuntu-xenial
version: latest

instance_groups:
- name: nexus
instances: 1
vm_type: default
persistent_disk: default
stemcell: xenial
azs: [z1]
networks:
- name: default
static_ips: [((internal_ip))]
jobs:
- name: java
release: openjdk
- name: nexus
release: nexus
properties:
nexus:
heap_size: 768M
max_direct_memory_size: 512M
- name: nexus-backup
release: nexus

update:
canaries: 1
max_in_flight: 1
serial: false
canary_watch_time: 1000-60000
update_watch_time: 1000-60000
```

then,

```
bosh deploy -d nexus nexus.yml -v internal_ip=<your_static_ip>
```
## Configuring the Runtime Environment

You will be able to access `http://<your_static_ip>:8081`


## How to enable SSL

A sample manifest is following:

``` yml
```yaml
---
name: nexus

releases:
- name: nexus
version: 0.12.0
url: https://github.com/making/nexus-boshrelease/releases/download/0.12.0/nexus-boshrelease-0.12.0.tgz
sha1: 09debef2e945a905e089b8d7c445df4d0b32f4e6
- name: openjdk
version: 8.0.1
url: https://github.com/making/openjdk-boshrelease/releases/download/8.0.1/openjdk-boshrelease-8.0.1.tgz
sha1: d02566fb6d974de4b60bf44dc21e56422c7da3fd

stemcells:
- alias: xenial
os: ubuntu-xenial
version: latest

instance_groups:
- name: nexus
instances: 1
vm_type: default
persistent_disk: default
stemcell: xenial
azs: [z1]
networks:
- name: default
static_ips: [((internal_ip))]
- name: nexus-repo
jobs:
- name: java
release: openjdk
- name: nexus
- name: nexus-repo
release: nexus
properties:
nexus:
heap_size: 768M
max_direct_memory_size: 512M
ssl_cert: ((nexus_ssl.certificate))
ssl_key: ((nexus_ssl.private_key))
ssl_only: true
- name: nexus-backup
release: nexus

update:
canaries: 1
max_in_flight: 1
serial: false
canary_watch_time: 1000-60000
update_watch_time: 1000-60000

nexus_repo:
secrets:
active_key: secret_1
keys:
secret_1: ((nexus_repo_encryption_secret_1))
additional_nexus_vmoptions:
- "-Dnexus.datastore.enabled=true"
- "-Dnexus.datastore.nexus.username=((nexus_db_user))"
- "-Dnexus.datastore.nexus.password=((nexus_db_password))"
- "-Dnexus.datastore.nexus.jdbcUrl=((nexus_jdbc_url))"
envs:
TEST_ENV1: abc
java_util_logging_properties:
".level": INFO
variables:
- name: nexus_pkcs12_password
type: password
- name: nexus_keystore_password
type: password
- name: default_ca
type: certificate
options:
is_ca: true
common_name: ca
- name: nexus_ssl
type: certificate
options:
ca: default_ca
common_name: ((internal_ip))
alternative_names:
- ((internal_ip))
```

then,

```
bosh deploy -d nexus nexus.yml -v internal_ip=<your_static_ip>
```

You will be able to access `https://<your_static_ip>:8443`


## Backup and Restore with [BBR](http://www.boshbackuprestore.io/)

### Backup

```
$ BOSH_CLIENT_SECRET=<BOSH_CLIENT_SECRET> \
bbr deployment \
--target <BOSH_TARGET_IP> \
--username <BOSH_CLIENT> \
--deployment nexus \
--ca-cert <PATH_TO_BOSH_SERVER_CERTIFICATE> \
backup
```

### Restore

```
$ BOSH_CLIENT_SECRET=<BOSH_CLIENT_SECRET> \
bbr deployment \
--target <BOSH_TARGET_IP> \
--username <BOSH_CLIENT> \
--deployment nexus \
--ca-cert <PATH_TO_BOSH_SERVER_CERTIFICATE> \
backup \
--artifact-path <PATH_TO_ARTIFACT_TO_RESTORE>
```

## How to create stand-alone vm on VirtualBox

Download [nexus.yml](deployment/nexus.yml).

```
$ bosh create-env nexus.yml -v internal_ip=192.168.230.40 --vars-store ./nexus-creds.yml
```

https://192.168.230.40

You can get `admin` user's password as follows:

```
bosh int nexus-creds.yml --path /admin_password
```

## How to develop this bosh release

```
bosh sync-blobs
bosh create-release --name=nexus --force --timestamp-version --tarball=/tmp/nexus-boshrelease.tgz && bosh upload-release /tmp/nexus-boshrelease.tgz && bosh -n -d nexus deploy manifest.yml -v internal_ip=<nexus static ip> --no-redact
```
- name: nexus_repo_encryption_secret_1
type: password
options:
length: 32
```
For more details, see:
- https://help.sonatype.com/en/configuring-the-runtime-environment.html
- [nexus-repo spec](jobs/nexus-repo/spec)
- [deployment manifests example](example/manifests/nexus.yml)

## TODO

- BBR
- Docker Registry UI using https://github.com/Joxit/docker-registry-ui
- Nexus IQ
- HA / PostgreSQL
Loading