Skip to content

Commit

Permalink
Merge pull request #29 from xoap-io/dev
Browse files Browse the repository at this point in the history
Feat: multiple changes
  • Loading branch information
ssokolic authored Apr 25, 2023
2 parents efe08b2 + 55d2bcf commit eea635d
Show file tree
Hide file tree
Showing 35 changed files with 1,009 additions and 16,360 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/commit-message-validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4
- uses: wagoid/commitlint-github-action@v5
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.3.1
uses: dependabot/fetch-metadata@v1.4.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Approve a PR
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/megalinter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
fetch-depth: 0
- name: MegaLinter
id: ml
uses: megalinter/megalinter/flavors/terraform@v5
uses: megalinter/megalinter/flavors/terraform@v6
env:
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISABLE: COPYPASTE,SPELL
DISABLE_LINTERS: TERRAFORM_TERRASCAN
- name: Archive production artifacts
if: ${{ success() }} || ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: MegaLinter reports
path: |
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/tagging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,22 @@ jobs:
fetch-depth: 0
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
- name: Zip Release
# You may pin to the exact commit or the version.
# uses: TheDoctor0/zip-release@09336613be18a8208dfa66bd57efafd9e2685657
id: zip
uses: TheDoctor0/zip-release@0.7.1
with:
type: 'zip'
filename: 'xoap-packer-templates_${{ steps.tag_version.outputs.new_tag }}.zip'
exclusions: '*.git* /*License/* CONTRIBUTING.md CODEOWNERS.md CODE_OF_CONDUCT.md .pre-commit.yaml .gitignore .gitattributes .github'
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: 'xoap-packer-templates_${{ steps.tag_version.outputs.new_tag }}.zip'
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
15 changes: 10 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v1.2.0
rev: v1.3.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -34,15 +34,20 @@ repos:
- -b master
- id: check-case-conflict
- repo: https://github.com/Checkmarx/kics
rev: v1.5.4
rev: v1.5.9
hooks:
- id: kics
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.13.0
rev: 0.15.1
hooks:
- id: check-github-workflows
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
rev: v2.6.2
hooks:
- id: prettier
stages: [commit]
- repo: https://github.com/xoap-io/pre-commit-packer
rev: v0.0.4
hooks:
- id: packer_validate
- id: packer_fmt
3 changes: 3 additions & 0 deletions CODEOWNERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* @ssokolic
* @xoap-io
*
108 changes: 75 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Guidelines](#guidelines)
- [Usage](#usage)
- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Windows Updates](#windows-updates)
- [Share the Love](#share-the-love)
- [Contributing](#contributing)
- [Bug Reports and Feature Requests](#bug-reports--feature-requests)
- [Developing](#developing)
- [Usage](#usage)
- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Windows Updates](#windows-updates)

---

## Introduction

This is the XOAP Packer repository.

It is part of our XOAP Automation Forces Open Source community library to give you a quick start into Infrastructure as Code deployments with Packer in addition to image.XO.
It is part of our [XOAP](https://xoap.io) Automation Forces Open Source community library to give you a quick start into Infrastructure as Code deployments with Packer in addition to image.XO.

Please check the links for more info, including usage information and full documentation:

Expand All @@ -45,56 +49,66 @@ he Conventional Commits specification is a lightweight convention on top of comm

The better a Pull Request description is, the better a review can understand and decide on how to review the changes. This improves implementation speed and reduces communication between the requester and the reviewer resulting in much less overhead.

[Wiriting A Great Pull Request Description](https://www.pullrequest.com/blog/writing-a-great-pull-request-description/)
[Writing A Great Pull Request Description](https://www.pullrequest.com/blog/writing-a-great-pull-request-description/)

Versioning is a crucial part for Terraform Stacks and Modules. Without version tags you cannot clearly create a stable environment and be sure that your latest changes won't crash your production environment (sure it still can happen, but we are trying our best to implement everything that we can to reduce the risk)

[Semantic Versioning](https://semver.org)

Naming Conventions for Terraform resources must be used.
---

## Share the Love

[Terraform Naming Conventions](https://www.terraform-best-practices.com/naming)
Like this project? Please give it a ★ on [our GitHub](https://github.com/xoap-io/xoap-uberagent-kibana-dashboards)! (it helps us a lot).

---

## Usage
## Contributing

### Installation
### Bug Reports & Feature Requests

For the first time using this template necessary tools need to be installed.
A script for PowerShell Core is provided under ./build/init.ps1
Please use the issue tracker to report any bugs or file feature requests.

This script will install following dependencies:
### Developing

- [pre-commit](https://github.com/pre-commit/pre-commit)
- [terraform-docs](https://github.com/terraform-docs/terraform-docs)
- [tflint](https://github.com/terraform-linters/tflint)
- [tfsec](https://github.com/aquasecurity/tfsec)
- [checkov](https://github.com/bridgecrewio/checkov)
- [terrascan](https://github.com/accurics/terrascan)
- [kics](https://github.com/Checkmarx/kics)
If you are interested in being a contributor and want to get involved in developing this project, we would love to hear from you! Email us.

This script configures:
PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

- global git template under ~/.git-template
- global pre-commit hooks for prepare-commit-msg and commit-msg under ~/.git-template/hooks
- github actions:
- linting and checks for pull requests from dev to master/main
- automatic tagging and release creation on pushes to master/main
- dependabot updates
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull Request so that we can review your changes

It currently supports the automated installation for macOS. Support for Windows and Linux will be available soon.
> NOTE: Be sure to merge the latest changes from "upstream" before making a pull request!
---

## Usage

### Installation

You can install Packer from the Hashicorp website: https://developer.hashicorp.com/packer/downloads?product_intent=packer.

### Prerequisites

All of the available Packer configurations are provided "as is" without any warranty.
All the available Packer configurations are provided "as is" without any warranty.

They where tested and run with the following infrastrcture:
They were tested and run with on following infrastructure:

- macOS Monterey 12.3.1
- macOS Ventura 13.3.1
- Hashicorp Packer 1.8.0
- VMware Fusion Pro 12.3.3
- Windows 10 21H2 Enterprise with Hyper-V
- Windows 10 22H2 Enterprise with Hyper-V

### Pre-Commit-Hooks

We added https://github.com/xoap-io/pre-commit-packer which enables validating and formating the packer configuration files.

> Every time you commit a change to your packer configuration files, the pre-commit hook will run and validate the configuration.
Additionally it is crucial to have a pkrvars.hcl and a pkr.hcl file in every subfolder so that the packer configuration files are correctly formatted and validated.

### Windows Updates

Expand All @@ -106,6 +120,34 @@ filters = [
"include:$true",
]

If you want your images to be updated to the latest feature level remove to following line:
If you want your images to be updated to the latest feature level, remove the following line:

"exclude:$\_.Title -like '_Feature update_'",

### helper

We added the KMS keys for the Windows based operating systems in helper/key-management-services.md

You can also find all the ISO image related operating system Keys for the unattended.xml in the same directory.

### amazon-ebs builder

#### AMI-IDs

> Be aware of the fact that AMI-Ids are region specific when defining them in the configuration.
#### Username and Password

> Don´t change the winrm user and password because "Administrator" must be specified and the password is generated during the Packer build.
#### Sysprep and Password retrieval

See https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2launch-v2.html for more information.

#### AWS account access

> We recommend using a local credentials file or assume a role instead of specifying access key and secret.
### azure-arm builder

### vmware-iso builder
Loading

0 comments on commit eea635d

Please sign in to comment.