Skip to content

Commit

Permalink
Migrate hashistack docs (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi authored Sep 23, 2024
1 parent fc39cff commit 052d1fd
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .web-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To install this plugin, copy and paste this code into Packer configuration, then
packer {
required_plugins {
hashistack = {
version = ">= 0.0.1"
version = ">= 0.0.42"
source = "github.com/QubitPi/hashistack"
}
}
Expand Down
22 changes: 19 additions & 3 deletions .web-docs/components/provisioner/webservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
be helpful to a user. See https://www.packer.io/docs/provisioner/null
-->

The `webservice` provisioner is used to install Jersey-Jetty webservice WAR file in AWS AMI image
The `webservice` provisioner is used to install a __[JAX-RS](https://jcp.org/en/jsr/detail?id=370) Jersey-Jetty__
webservice WAR file in AWS AMI image. Note that EBS volumes during build time will
[automatically be removed](https://packer.qubitpi.org/packer/integrations/hashicorp/amazon/latest/components/builder/ebs)

We take an opinionated webservice image, which goes without SSL, because
[backend API should site behind a proxy or gateway](https://dev.to/behalf/authentication-authorization-in-microservices-architecture-part-i-2cn0#global-authentication-api-gateway-and-authorization-per-service).
In addition, webservice executables are assumed to be in WAR format and is ready before preceding in order to simplify
Packer build process.

<!-- Provisioner Configuration Fields -->

Expand All @@ -13,7 +19,6 @@ The `webservice` provisioner is used to install Jersey-Jetty webservice WAR file
- `warSource` (string) - The path to a local WAR file to upload to the machine. The path can be absolute or relative. If
it is relative, it is relative to the working directory when Packer is executed.


<!--
Optional Configuration Fields
Expand All @@ -34,18 +39,29 @@ The `webservice` provisioner is used to install Jersey-Jetty webservice WAR file

### Example Usage

In the following example, an AWS [AMI](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) image called
"my-webservice" is to be created and get registered into
[us-west-1](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html#Concepts.RegionsAndAvailabilityZones.Availability)
region. The size of the image would be [micro](https://aws.amazon.com/ec2/instance-types/) in this example and the base
image is an Ubuntu 22.04:

```hcl
packer {
required_plugins {
amazon = {
version = ">= 0.0.2"
source = "github.com/hashicorp/amazon"
}
hashistack = {
version = ">= 0.0.42"
source = "github.com/QubitPi/hashistack"
}
}
}
source "amazon-ebs" "hashistack" {
ami_name = "packer-plugin-hashistack-acc-test-ami"
ami_name = "my-webservice"
force_deregister = "true"
force_delete_snapshot = "true"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ HashiStack Packer Plugin
![GitHub Last Commit]
[![Apache License][Apache License Badge]][Apache License URL]

The hashistack multi-component plugin can be used with HashiCorp [Packer][HashiCorp Packer] to create images
supported by [hashistack]. For the full list of available features for this plugin see [docs](./docs).
The hashistack multi-component plugin can be used with HashiCorp [Packer][HashiCorp Packer] to create images hosted in
[hashistack]. For the full list of available features for this plugin see [docs](./docs).

Installation
------------
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To install this plugin, copy and paste this code into Packer configuration, then
packer {
required_plugins {
hashistack = {
version = ">= 0.0.1"
version = ">= 0.0.42"
source = "github.com/QubitPi/hashistack"
}
}
Expand Down
22 changes: 19 additions & 3 deletions docs/provisioners/webservice.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ Type: `webservice`
be helpful to a user. See https://www.packer.io/docs/provisioners/null
-->

The `webservice` provisioner is used to install Jersey-Jetty webservice WAR file in AWS AMI image
The `webservice` provisioner is used to install a __[JAX-RS](https://jcp.org/en/jsr/detail?id=370) Jersey-Jetty__
webservice WAR file in AWS AMI image. Note that EBS volumes during build time will
[automatically be removed](https://packer.qubitpi.org/packer/integrations/hashicorp/amazon/latest/components/builder/ebs)

We take an opinionated webservice image, which goes without SSL, because
[backend API should site behind a proxy or gateway](https://dev.to/behalf/authentication-authorization-in-microservices-architecture-part-i-2cn0#global-authentication-api-gateway-and-authorization-per-service).
In addition, webservice executables are assumed to be in WAR format and is ready before preceding in order to simplify
Packer build process.

<!-- Provisioner Configuration Fields -->

Expand All @@ -16,7 +22,6 @@ The `webservice` provisioner is used to install Jersey-Jetty webservice WAR file
- `warSource` (string) - The path to a local WAR file to upload to the machine. The path can be absolute or relative. If
it is relative, it is relative to the working directory when Packer is executed.


<!--
Optional Configuration Fields

Expand All @@ -37,18 +42,29 @@ The `webservice` provisioner is used to install Jersey-Jetty webservice WAR file

### Example Usage

In the following example, an AWS [AMI](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) image called
"my-webservice" is to be created and get registered into
[us-west-1](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html#Concepts.RegionsAndAvailabilityZones.Availability)
region. The size of the image would be [micro](https://aws.amazon.com/ec2/instance-types/) in this example and the base
image is an Ubuntu 22.04:

```hcl
packer {
required_plugins {
amazon = {
version = ">= 0.0.2"
source = "github.com/hashicorp/amazon"
}

hashistack = {
version = ">= 0.0.42"
source = "github.com/QubitPi/hashistack"
}
}
}

source "amazon-ebs" "hashistack" {
ami_name = "packer-plugin-hashistack-acc-test-ami"
ami_name = "my-webservice"
force_deregister = "true"
force_delete_snapshot = "true"

Expand Down

0 comments on commit 052d1fd

Please sign in to comment.