Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
Migrate WS doc to plugin repo
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Sep 30, 2024
1 parent d0d8245 commit c4dc534
Show file tree
Hide file tree
Showing 75 changed files with 286 additions and 887 deletions.
24 changes: 12 additions & 12 deletions .github/actions/jersey-webservice-template/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,30 +75,30 @@ runs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK
uses: QubitPi/hashicorp-aws/.github/actions/jdk-setup@master
uses: QubitPi/hashistack/.github/actions/jdk-setup@master

- name: Checkout HashiCorp deployment tool and setup directory structure
shell: bash
run: |
git clone --depth 1 https://github.com/QubitPi/hashicorp-aws.git ../hashicorp-aws
git clone --depth 1 https://github.com/QubitPi/hashistack.git ../hashistack
if [ ${{ inputs.ssl }} ]; then
cd ../hashicorp-aws/hashicorp/webservice/images
cd ../hashistack/hashicorp/webservice/images
mv ssl/* .
rm -rf basic
else
cd ../hashicorp-aws/hashicorp/webservice/images
cd ../hashistack/hashicorp/webservice/images
mv basic/* .
rm -rf ssl
fi
- name: Load Packer variable file
run: echo '${{ inputs.aws-ws-pkrvars-hcl }}' > ../hashicorp-aws/hashicorp/webservice/images/aws-ws.auto.pkrvars.hcl
run: echo '${{ inputs.aws-ws-pkrvars-hcl }}' > ../hashistack/hashicorp/webservice/images/aws-ws.auto.pkrvars.hcl
shell: bash
- name: Load Terraform variable file
run: echo '${{ inputs.aws-ws-tfvars }}' > ../hashicorp-aws/hashicorp/webservice/instances/aws-ws.auto.tfvars
run: echo '${{ inputs.aws-ws-tfvars }}' > ../hashistack/hashicorp/webservice/instances/aws-ws.auto.tfvars
shell: bash
- name: Configure SSL
if: ${{ inputs.ssl }}
uses: QubitPi/hashicorp-aws/.github/actions/ssl-setup@master
uses: QubitPi/hashistack/.github/actions/ssl-setup@master
with:
aws-ws-pkrvars-hcl: ${{ secrets.AWS_WS_PKRVARS_HCL }}
ssl-certificate: ${{ secrets.SSL_CERTIFICATE }}
Expand All @@ -108,12 +108,12 @@ runs:

- name: Load Filebeat config file
if: "${{ inputs.filebeat-config-file != '' }}"
run: echo '${{ inputs.filebeat-config-file }}' > ../hashicorp-aws/hashicorp/webservice/images/filebeat.yml
run: echo '${{ inputs.filebeat-config-file }}' > ../hashistack/hashicorp/webservice/images/filebeat.yml
shell: bash

- name: Install data-models
if: ${{ input.template == 'jps' }}
uses: QubitPi/hashicorp-aws/jpa-elide/install-data-models@master
uses: QubitPi/hashistack/jpa-elide/install-data-models@master
with:
model-package-jar-group-id: com.qubitpi
model-package-jar-artifact-id: jersey-webservice-template-jpa-data-models
Expand All @@ -124,13 +124,13 @@ runs:
run: mvn -B clean package
shell: bash
- name: Move WAR file to a location for HashiCorp deployment to pickup
run: mv ${{ inputs.war-path }} ../hashicorp-aws/hashicorp/webservice/images/
run: mv ${{ inputs.war-path }} ../hashistack/hashicorp/webservice/images/
shell: bash

- name: Run deployment
uses: QubitPi/hashicorp-aws@master
uses: QubitPi/hashistack@master
with:
hashicorp-dir: ../hashicorp-aws/hashicorp/webservice
hashicorp-dir: ../hashistack/hashicorp/webservice
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: ${{ inputs.aws-region }}
6 changes: 3 additions & 3 deletions .github/actions/npm-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ runs:
registry-url: "https://registry.npmjs.org"
- name: Tag for release
run: |
git clone --depth 1 https://github.com/QubitPi/hashicorp-aws.git ../hashicorp-aws
cp ../hashicorp-aws/.github/version-bump/tag-for-release.bash .github/tag-for-release.bash
cp ../hashicorp-aws/.github/version-bump/upversion.py .github/upversion.py
git clone --depth 1 https://github.com/QubitPi/hashistack.git ../hashistack
cp ../hashistack/.github/version-bump/tag-for-release.bash .github/tag-for-release.bash
cp ../hashistack/.github/version-bump/upversion.py .github/upversion.py
git config --global user.name '${{ inputs.user }}'
git config --global user.email '${{ inputs.email }}'
.github/tag-for-release.bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ jobs:
- name: Build website
run: yarn build
- name: Load CNAME file
#if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master'
run: cp CNAME build
- name: Deploy to GitHub Pages
#if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
fetch-depth: 0
- name: Download auto-version bump scripts
run: |
git clone https://github.com/QubitPi/hashicorp-aws.git ../hashicorp-aws
cp ../hashicorp-aws/.github/version-bump/tag-for-release.bash .github/
cp ../hashicorp-aws/.github/version-bump/upversion.py .github/
git clone https://github.com/QubitPi/hashistack.git ../hashistack
cp ../hashistack/.github/version-bump/tag-for-release.bash .github/
cp ../hashistack/.github/version-bump/upversion.py .github/
- name: Tag for release
run: |
git config --global user.name ${{ inputs.user }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/yml-md-style-and-link-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- uses: actions/checkout@v3
- name: Load custom config files if specified
if: ${{ !inputs.use-custom-yamllint-config-file }}
run: wget https://raw.githubusercontent.com/QubitPi/hashicorp-aws/master/.github/yml-md-style-and-link-checks/.yamllint
run: wget https://raw.githubusercontent.com/QubitPi/hashistack/master/.github/yml-md-style-and-link-checks/.yamllint
- uses: actionshub/yamllint@main

markdown-lint:
Expand All @@ -60,10 +60,10 @@ jobs:
- uses: actions/checkout@v3
- name: Load custom config files if specified
if: ${{ !inputs.use-custom-mdlrc-config-file }}
run: wget https://raw.githubusercontent.com/QubitPi/hashicorp-aws/master/.github/yml-md-style-and-link-checks/.mdlrc
run: wget https://raw.githubusercontent.com/QubitPi/hashistack/master/.github/yml-md-style-and-link-checks/.mdlrc
- name: Load custom config files if specified
if: ${{ !inputs.use-custom-markdownlint-config-file }}
run: wget https://raw.githubusercontent.com/QubitPi/hashicorp-aws/master/.github/yml-md-style-and-link-checks/markdownlint.rb
run: wget https://raw.githubusercontent.com/QubitPi/hashistack/master/.github/yml-md-style-and-link-checks/markdownlint.rb
- uses: actionshub/markdownlint@main

linkChecker:
Expand All @@ -73,7 +73,7 @@ jobs:
- uses: actions/checkout@v3
- name: Load default link check config if not specified
if: ${{ !inputs.use-custom-lycheeignore-file }}
run: wget https://raw.githubusercontent.com/QubitPi/hashicorp-aws/master/.github/yml-md-style-and-link-checks/.lycheeignore
run: wget https://raw.githubusercontent.com/QubitPi/hashistack/master/.github/yml-md-style-and-link-checks/.lycheeignore
- name: Link Checker
uses: lycheeverse/[email protected]
with:
Expand Down
4 changes: 1 addition & 3 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
file:///*
https://ci-cd.hashicorp-aws.com/
https://ci-cd.hashistack.com/
http.*://maven.apache.org/*
https://hashistack.org/
https://ci-cd.hashistack.com/
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ HashiStack
[![HashiCorp Packer Badge][HashiCorp Packer Badge]][HashiCorp Packer URL]
[![HashiCorp Terraform Badge][HashiCorp Terraform Badge]][HashiCorp Terraform URL]
[![Screwdriver pipeline badge][Screwdriver pipeline badge]][Screwdriver pipeline URL]
[![Discord]](https://discord.com/widget?id=1060753787125514332)
[![Apache License][Apache License Badge]][Apache License URL]
[![Apache License][Apache License Badge]][Apache License, Version 2.0]

</div>

Expand All @@ -22,7 +21,7 @@ infrastructure__. Specifically, it
> [!NOTE]
>
> If one is interested in non-OpenStack cloud provider as an alternative, please check out
> [immutable-infrastructure.com] which is a fork of this project that targets Amazon AWS <img src="https://github.com/QubitPi/QubitPi/blob/master/img/8%E5%A5%BD.gif?raw=true" height="40px"/>
> [immutable-infrastructure.com] which is a fork of this project that targets Amazon AWS
A Story behind HashiStack
------------------------
Expand All @@ -49,17 +48,8 @@ License

The use and distribution terms for [HashiStack]() are covered by the [Apache License, Version 2.0].

<div align="center">
<a href="https://opensource.org/licenses">
<img align="center" width="50%" alt="License Illustration" src="https://github.com/QubitPi/QubitPi/blob/master/img/apache-2.png?raw=true">
</a>
</div>

[Apache License, Version 2.0]: http://www.apache.org/licenses/LICENSE-2.0.html
[Apache License, Version 2.0]: https://www.apache.org/licenses/LICENSE-2.0
[Apache License Badge]: https://img.shields.io/badge/Apache%202.0-F25910.svg?style=for-the-badge&logo=Apache&logoColor=white
[Apache License URL]: https://www.apache.org/licenses/LICENSE-2.0

[Discord]: https://img.shields.io/discord/1060753787125514332?color=5865F2&logo=discord&logoColor=ffffff&style=for-the-badge

[GitHub Last Commit]: https://img.shields.io/github/last-commit/QubitPi/hashistack/master?logo=github&style=for-the-badge
[GitHub Workflow Status Badge]: https://img.shields.io/github/actions/workflow/status/QubitPi/hashistack/ci-cd.yml?branch=master&logo=github&style=for-the-badge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,27 @@ config:
steps:
- install-packer: sd-cmd exec QubitPi/install-hashicorp-packer-ubuntu@latest
- install-terraform: sd-cmd exec QubitPi/install-hashicorp-terraform-ubuntu@latest
- checkout-hashicorp-deployment-tool: git clone --depth 1 https://github.com/QubitPi/hashicorp-aws.git ../hashicorp-aws
- checkout-hashicorp-deployment-tool: git clone --depth 1 https://github.com/QubitPi/hashistack.git ../hashistack

- load-packer-variable-file: |
echo ami_region = \"$(meta get parameters.ami-region.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/images/aws.auto.pkrvars.hcl
echo ami_name = \"$(meta get parameters.ami-name.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/images/aws.auto.pkrvars.hcl
echo base_domain = \"$(meta get parameters.base-domain.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/images/aws.auto.pkrvars.hcl
echo ssl_cert_base64 = \"$SSL_CERT_BASE_64\" >> ../hashicorp-aws/hashicorp/docker-mailserver/images/aws.auto.pkrvars.hcl
echo ssl_cert_key_base64 = \"$SSL_CERT_KEY_BASE_64\" >> ../hashicorp-aws/hashicorp/docker-mailserver/images/aws.auto.pkrvars.hcl
echo ami_region = \"$(meta get parameters.ami-region.value)\" >> ../hashistack/hashicorp/docker-mailserver/images/aws.auto.pkrvars.hcl
echo ami_name = \"$(meta get parameters.ami-name.value)\" >> ../hashistack/hashicorp/docker-mailserver/images/aws.auto.pkrvars.hcl
echo base_domain = \"$(meta get parameters.base-domain.value)\" >> ../hashistack/hashicorp/docker-mailserver/images/aws.auto.pkrvars.hcl
echo ssl_cert_base64 = \"$SSL_CERT_BASE_64\" >> ../hashistack/hashicorp/docker-mailserver/images/aws.auto.pkrvars.hcl
echo ssl_cert_key_base64 = \"$SSL_CERT_KEY_BASE_64\" >> ../hashistack/hashicorp/docker-mailserver/images/aws.auto.pkrvars.hcl
- load-terraform-variable-file: |
echo aws_ec2_region = \"$(meta get parameters.aws-deploy-region.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo ami_name = \"$(meta get parameters.ami-name.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo instance_name = \"$(meta get parameters.instance-name.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo key_pair_name = \"$(meta get parameters.key-pair-name.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo security_groups = $(meta get parameters.security-groups.value) >> ../hashicorp-aws/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo base_domain = \"$(meta get parameters.base-domain.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo route_53_zone_id = \"$(meta get parameters.route-53-zone-id.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo first_email = \"$(meta get parameters.first-email.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo first_email_password = \"$(meta get parameters.first-email-password.value)\" >> ../hashicorp-aws/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo aws_ec2_region = \"$(meta get parameters.aws-deploy-region.value)\" >> ../hashistack/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo ami_name = \"$(meta get parameters.ami-name.value)\" >> ../hashistack/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo instance_name = \"$(meta get parameters.instance-name.value)\" >> ../hashistack/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo key_pair_name = \"$(meta get parameters.key-pair-name.value)\" >> ../hashistack/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo security_groups = $(meta get parameters.security-groups.value) >> ../hashistack/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo base_domain = \"$(meta get parameters.base-domain.value)\" >> ../hashistack/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo route_53_zone_id = \"$(meta get parameters.route-53-zone-id.value)\" >> ../hashistack/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo first_email = \"$(meta get parameters.first-email.value)\" >> ../hashistack/hashicorp/docker-mailserver/instances/aws.auto.tfvars
echo first_email_password = \"$(meta get parameters.first-email-password.value)\" >> ../hashistack/hashicorp/docker-mailserver/instances/aws.auto.tfvars
- packer-init: cd ../hashicorp-aws/hashicorp/docker-mailserver/images && packer init .
- packer-init: cd ../hashistack/hashicorp/docker-mailserver/images && packer init .
- packer-validate: packer validate -var "skip_create_ami=true" .
- packer-build: packer build -var "skip_create_ami=false" .

Expand Down
34 changes: 17 additions & 17 deletions adaptors/screwdriver-cd/templates/elk-sd-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ config:
value: "My AWS SSH key pair name"
description: |
The name of AWS EC2 key pair bound to this ELK instance. We will use this key pair to later ssh into the ELK EC2
to for post setup discussed in hashicorp-aws documentation
to for post setup discussed in hashistack documentation
security-groups:
value: '["My ELK API Security Group", "My ELK Admin Security Group"]'
description: "The list of AWS Security Group names (yes, not ID, but name...) bound to the ELK EC2 instance."
Expand All @@ -49,28 +49,28 @@ config:
steps:
- install-packer: sd-cmd exec QubitPi/install-hashicorp-packer-ubuntu@latest
- install-terraform: sd-cmd exec QubitPi/install-hashicorp-terraform-ubuntu@latest
- checkout-hashicorp-deployment-tool: git clone --depth 1 https://github.com/QubitPi/hashicorp-aws.git ../hashicorp-aws
- checkout-hashicorp-deployment-tool: git clone --depth 1 https://github.com/QubitPi/hashistack.git ../hashistack

- load-ssl-certificate-file: echo "$SSL_CERTIFICATE" > ../hashicorp-aws/hashicorp/elk/images/ssl.crt
- load-ssl-certificate-key-file: echo "$SSL_CERTIFICATE_KEY" > ../hashicorp-aws/hashicorp/elk/images/ssl.key
- configure-nginx-ssl: sed -i -e "s/elk.domain.com/$(meta get parameters.elk-domain.value)/g" ../hashicorp-aws/hashicorp/elk/images/nginx-ssl.conf
- load-ssl-certificate-file: echo "$SSL_CERTIFICATE" > ../hashistack/hashicorp/elk/images/ssl.crt
- load-ssl-certificate-key-file: echo "$SSL_CERTIFICATE_KEY" > ../hashistack/hashicorp/elk/images/ssl.key
- configure-nginx-ssl: sed -i -e "s/elk.domain.com/$(meta get parameters.elk-domain.value)/g" ../hashistack/hashicorp/elk/images/nginx-ssl.conf

- load-packer-variable-file: |
echo ami_region = \"$(meta get parameters.ami-region.value)\" >> ../hashicorp-aws/hashicorp/elk/images/aws.auto.pkrvars.hcl
echo ami_name = \"$(meta get parameters.ami-name.value)\" >> ../hashicorp-aws/hashicorp/elk/images/aws.auto.pkrvars.hcl
echo ssl_cert_file_path = \"ssl.crt\" >> ../hashicorp-aws/hashicorp/elk/images/aws.auto.pkrvars.hcl
echo ssl_cert_key_file_path = \"ssl.key\" >> ../hashicorp-aws/hashicorp/elk/images/aws.auto.pkrvars.hcl
echo ami_region = \"$(meta get parameters.ami-region.value)\" >> ../hashistack/hashicorp/elk/images/aws.auto.pkrvars.hcl
echo ami_name = \"$(meta get parameters.ami-name.value)\" >> ../hashistack/hashicorp/elk/images/aws.auto.pkrvars.hcl
echo ssl_cert_file_path = \"ssl.crt\" >> ../hashistack/hashicorp/elk/images/aws.auto.pkrvars.hcl
echo ssl_cert_key_file_path = \"ssl.key\" >> ../hashistack/hashicorp/elk/images/aws.auto.pkrvars.hcl
- load-terraform-variable-file: |
echo aws_ec2_region = \"$(meta get parameters.aws-deploy-region.value)\" >> ../hashicorp-aws/hashicorp/elk/instances/aws.auto.tfvars
echo ami_name = \"$(meta get parameters.ami-name.value)\" >> ../hashicorp-aws/hashicorp/elk/instances/aws.auto.tfvars
echo instance_name = \"$(meta get parameters.instance-name.value)\" >> ../hashicorp-aws/hashicorp/elk/instances/aws.auto.tfvars
echo key_pair_name = \"$(meta get parameters.key-pair-name.value)\" >> ../hashicorp-aws/hashicorp/elk/instances/aws.auto.tfvars
echo security_groups = $(meta get parameters.security-groups.value) >> ../hashicorp-aws/hashicorp/elk/instances/aws.auto.tfvars
echo elk_domain = \"$(meta get parameters.elk-domain.value)\" >> ../hashicorp-aws/hashicorp/elk/instances/aws.auto.tfvars
echo route_53_zone_id = \"$(meta get parameters.route-53-zone-id.value)\" >> ../hashicorp-aws/hashicorp/elk/instances/aws.auto.tfvars
echo aws_ec2_region = \"$(meta get parameters.aws-deploy-region.value)\" >> ../hashistack/hashicorp/elk/instances/aws.auto.tfvars
echo ami_name = \"$(meta get parameters.ami-name.value)\" >> ../hashistack/hashicorp/elk/instances/aws.auto.tfvars
echo instance_name = \"$(meta get parameters.instance-name.value)\" >> ../hashistack/hashicorp/elk/instances/aws.auto.tfvars
echo key_pair_name = \"$(meta get parameters.key-pair-name.value)\" >> ../hashistack/hashicorp/elk/instances/aws.auto.tfvars
echo security_groups = $(meta get parameters.security-groups.value) >> ../hashistack/hashicorp/elk/instances/aws.auto.tfvars
echo elk_domain = \"$(meta get parameters.elk-domain.value)\" >> ../hashistack/hashicorp/elk/instances/aws.auto.tfvars
echo route_53_zone_id = \"$(meta get parameters.route-53-zone-id.value)\" >> ../hashistack/hashicorp/elk/instances/aws.auto.tfvars
- packer-init: cd ../hashicorp-aws/hashicorp/elk/images && packer init .
- packer-init: cd ../hashistack/hashicorp/elk/images && packer init .
- packer-validate: packer validate -var "skip_create_ami=true" .
- packer-build: packer build -var "skip_create_ami=false" .

Expand Down
Loading

0 comments on commit c4dc534

Please sign in to comment.