Skip to content

Commit

Permalink
Add documentations for Sonatype Nexus Repository plugin (QubitPi#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Jun 25, 2024
1 parent 2323df6 commit 2d94f19
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 334 deletions.
7 changes: 3 additions & 4 deletions .web-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

### Installation

To install this plugin, copy and paste this code into your Packer configuration, then run [`packer init`](https://www.packer.io/docs/commands/init).
To install this plugin, copy and paste this code into Packer configuration, then run [`packer init`](https://www.packer.io/docs/commands/init).

```hcl
packer {
Expand All @@ -22,7 +22,7 @@ packer {
}
```

Alternatively, you can use `packer plugins install` to manage installation of this plugin.
Alternatively, we can use `packer plugins install` to manage installation of this plugin.

```sh
$ packer plugins install github.com/QubitPi/hashicorp-aws
Expand All @@ -32,5 +32,4 @@ $ packer plugins install github.com/QubitPi/hashicorp-aws

#### Provisioners

- [Kong API Gateway](./provisioners/kong-api-gateway.mdx)
- [Docker Mailserver](./provisioners/docker-mailserver.mdx)
- [Sonatype Nexus Repository](./provisioners/sonatype-nexus-repository.mdx)
80 changes: 0 additions & 80 deletions .web-docs/components/provisioner/docker-mailserver/README.md

This file was deleted.

80 changes: 0 additions & 80 deletions .web-docs/components/provisioner/kong-api-gateway/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
Include a short description about the provisioner. This is a good place
to call out what the provisioner does, and any additional text that might
be helpful to a user. See https://www.packer.io/docs/provisioner/null
-->

The `sonatype-nexus-repository` provisioner is used to install Sonatype Nexus Repository package in AWS AMI image


<!-- Provisioner Configuration Fields -->

**Required**

- `sonatypeNexusRepositoryDomain` (string) - the SSL-enabled domain that will serve the deployed HTTP Nexus instance.
- `sslCertBase64` (string) - is a __base64 encoded__ string of the content of
[SSL certificate file](https://hashicorp-aws.com/docs/setup#optional-setup-ssl) for the SSL-enabled domain, for
example `nexus.mycompany.com` given the `sonatypeNexusRepositoryDomain` is `nexus.mycompany.com`.
- `sslCertKeyBase64` (string) - is a __base64 encoded__ string of the content of
[SSL certificate key file](https://hashicorp-aws.com/docs/setup#optional-setup-ssl) for the SSL-enabled domain, for
example `nexus.mycompany.com` given the `sonatypeNexusRepositoryDomain` is `nexus.mycompany.com`.

<!--
Optional Configuration Fields
Configuration options that are not required or have reasonable defaults
should be listed under the optionals section. Defaults values should be
noted in the description of the field
-->

**Optional**

- `homeDir` (string) - The `$Home` directory in AMI image; default to `/home/ubuntu`

<!--
A basic example on the usage of the provisioner. Multiple examples
can be provided to highlight various configurations.
-->

### Example Usage

```hcl
packer {
required_plugins {
amazon = {
version = ">= 0.0.2"
source = "github.com/hashicorp/amazon"
}
}
}
source "amazon-ebs" "hashicorp-aws" {
ami_name = "packer-plugin-hashicorp-aws-acc-test-ami"
force_deregister = "true"
force_delete_snapshot = "true"
instance_type = "t2.micro"
launch_block_device_mappings {
device_name = "/dev/sda1"
volume_size = 8
volume_type = "gp2"
delete_on_termination = true
}
region = "us-west-1"
source_ami_filter {
filters = {
name = "ubuntu/images/*ubuntu-*-22.04-amd64-server-*"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["099720109477"]
}
ssh_username = "ubuntu"
}
build {
sources = [
"source.amazon-ebs.hashicorp-aws"
]
provisioner "hashicorp-aws-sonatype-nexus-repository-provisioner" {
homeDir = "/home/ubuntu"
sslCertBase64 = "YXNkZnNnaHRkeWhyZXJ3ZGZydGV3ZHNmZ3RoeTY0cmV3ZGZyZWd0cmV3d2ZyZw=="
sslCertKeyBase64 = "MzI0NXRnZjk4dmJoIGNsO2VbNDM1MHRdzszNDM1b2l0cmo="
sonatypeNexusRepositoryDomain = "nexus.mycompany.com"
}
}
```
7 changes: 3 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

### Installation

To install this plugin, copy and paste this code into your Packer configuration, then run [`packer init`](https://www.packer.io/docs/commands/init).
To install this plugin, copy and paste this code into Packer configuration, then run [`packer init`](https://www.packer.io/docs/commands/init).

```hcl
packer {
Expand All @@ -22,7 +22,7 @@ packer {
}
```

Alternatively, you can use `packer plugins install` to manage installation of this plugin.
Alternatively, we can use `packer plugins install` to manage installation of this plugin.

```sh
$ packer plugins install github.com/QubitPi/hashicorp-aws
Expand All @@ -32,5 +32,4 @@ $ packer plugins install github.com/QubitPi/hashicorp-aws

#### Provisioners

- [Kong API Gateway](./provisioners/kong-api-gateway.mdx)
- [Docker Mailserver](./provisioners/docker-mailserver.mdx)
- [Sonatype Nexus Repository](./provisioners/sonatype-nexus-repository.mdx)
83 changes: 0 additions & 83 deletions docs/provisioners/docker-mailserver.mdx

This file was deleted.

Loading

0 comments on commit 2d94f19

Please sign in to comment.