Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

feat: extract nginx role into external repository#37

Merged
saitho merged 14 commits intomasterfrom
feature/extract-nginx-plugin
Aug 22, 2020
Merged

feat: extract nginx role into external repository#37
saitho merged 14 commits intomasterfrom
feature/extract-nginx-plugin

Conversation

@saitho
Copy link
Copy Markdown
Member

@saitho saitho commented Aug 21, 2020

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Exclude nginx webserver role into own repository (https://github.com/getstackhead/module-webserver-nginx) and publish it on Ansible Galaxy. This is to allow installing it only when it is needed (in the future; right now it is a fixed dependency).

  • What is the current behavior? (You can also link to an open issue here)
    Role is part of the repository.

  • What is the new behavior (if this is a feature change)?
    Role is loaded as dependencies is installed via Ansible requirements.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    Format of setting stackhead__webserver changed.
    Now the name of the role to be used has to be given.

Before: nginx; after: getstackhead.stackhead_webserver_nginx
Before: caddy; after: stackhead_webserver_caddy (until caddy is moved to an external repository)

@github-actions github-actions bot added deployment Something about application deployment setup Something about server setup labels Aug 21, 2020
@saitho saitho added the action/integration-test PRs with this label be integration tested label Aug 21, 2020
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 21, 2020
@saitho saitho removed the action/integration-test PRs with this label be integration tested label Aug 21, 2020
@saitho
Copy link
Copy Markdown
Member Author

saitho commented Aug 21, 2020

Documentation has to be updated accordingly.

@saitho saitho added the action/integration-test PRs with this label be integration tested label Aug 22, 2020
@saitho saitho force-pushed the feature/extract-nginx-plugin branch from 9e22084 to 19b0612 Compare August 22, 2020 09:26
@saitho saitho merged commit 99ba99b into master Aug 22, 2020
@saitho saitho deleted the feature/extract-nginx-plugin branch August 22, 2020 10:47
@saitho saitho linked an issue Aug 22, 2020 that may be closed by this pull request
3 tasks
@saitho saitho added this to the v1.0.0 milestone Aug 30, 2020
github-actions bot pushed a commit that referenced this pull request Dec 31, 2020
# 1.0.0 (2020-12-31)

### Bug Fixes

* **action:** ansible collection build path ([e785d1f](e785d1f))
* **action:** fix extra conf options format ([c6cc58a](c6cc58a))
* **action:** set nginx http options ([8c759da](8c759da))
* **action/integration:** fix config path ([39a8a0f](39a8a0f))
* **ansible:** add missing check on empty values ([49b7866](49b7866))
* **ansible:** assert syntax ([8ba7617](8ba7617))
* **ansible:** clear terraform providers before setting them ([0d01134](0d01134))
* **ansible:** do not require sodo for module file check ([d5aabfd](d5aabfd))
* **ansible:** double escape all escape characters ([0878c78](0878c78))
* **ansible:** fix terraform escape filter ([da4be49](da4be49))
* **ansible:** only remove unused symlinks ([349e8bd](349e8bd))
* **ansible:** rename directory schema to schemas ([63fa58c](63fa58c))
* **ansible/api:** include public tasks ([23f49de](23f49de))
* **ci:** remove schema symlink ([3426d7d](3426d7d))
* **cli:** check if schema file exists ([b21f33b](b21f33b))
* **cli:** collection install path ([#60](https://github.com/getstackhead/stackhead/issues/60)) ([dc6b9b2](dc6b9b2))
* **cli:** do not install collection dependencies in collection folder ([d69d52d](d69d52d))
* **cli:** exit command if error occurs ([4bbb101](4bbb101))
* **cli:** fix typo in folder ([3550faa](3550faa))
* **cli:** fix validation command ([6bfa82c](6bfa82c))
* **cli:** require project definition for destroy ([f7d86c0](f7d86c0))
* **cli:** show actual error message that caused abort ([4193dc2](4193dc2))
* **deployment:** exception on missing default for php version ([8275718](8275718))
* **module-api:** assert syntax ([61bb3ae](61bb3ae))
* **schema:** disallow single quotes in container hooks ([2b499c8](2b499c8))
* **terraform:** ensure old provider is installed before replacing it ([6f56e7d](6f56e7d))
* **terraform:** test tfstate before replacing providers ([2439e9e](2439e9e))
* check if terraform provider init is set ([41eac0c](41eac0c))
* fix config errors ([7aa06c8](7aa06c8))
* initialize submodules after package installation ([bb109ae](bb109ae))
* limit Terraform to latest 0.12 release ([31e7ca5](31e7ca5))
* load module defaults and variables if available ([caf9b8a](caf9b8a))
* raise error if no role path is found ([ac0c405](ac0c405))
* run docker python commands in virtualenv ([7622245](7622245))
* use forked virtualization collection ([cae590f](cae590f))
* use new container name when checking port ([0d35c17](0d35c17))
* wrong include usage and variable comparison ([978289f](978289f))

### chore

* drop after_setup and before_destroy container hooks ([909f3d9](909f3d9))
* move playbooks and roles into Ansible folder ([ae7ccb7](ae7ccb7))
* raise dependencies ([3a7da5a](3a7da5a))
* rename repository into stackhead ([8741444](8741444))

### Features

* **action:** add deploy action ([6696b51](6696b51))
* **action:** add plugins option ([73345e4](73345e4))
* **action:** update project definition file names ([8c766c6](8c766c6))
* **ansible:** add filter for escaping double quotes for Terraform ([123e242](123e242))
* **ansible:** add stackhead__tf_update_realtime ([82d7fd9](82d7fd9))
* **ansible:** add system containers ([4d0d69e](4d0d69e))
* **ansible:** execute plugin modules ([2d22629](2d22629))
* **ansible:** improve module step execution ([0b8c68e](0b8c68e))
* **ansible:** include module steps only if they exist ([454bc46](454bc46))
* **ansible:** initially load all module config ([656f3c7](656f3c7))
* **ansible:** migrations handling ([75a268e](75a268e))
* perform migration step if exists before each module step ([78be0af](78be0af))
* **ansible:** validate module constraints ([8194101](8194101))
* **ansible/deploy:** check StackHead version ([83bd423](83bd423))
* **ansible/modules:** add module-main.yml task ([d3f3c23](d3f3c23))
* **ansible/modules:** add public load-config task ([9287c5f](9287c5f))
* **ansible/modules:** write module config in separate variables ([155ec95](155ec95))
* **ansible/requirements:** add virtualization collection ([a63d3e2](a63d3e2))
* **ansible/requirements:** remove geerlingguy.docker dependencies ([1b7303d](1b7303d))
* **ansible/setup:** set StackHead version fact ([f414326](f414326))
* **cli:** add deploy command ([d455885](d455885))
* **cli:** add destroy command ([bb46d05](bb46d05))
* **cli:** add init command ([4166a2b](4166a2b))
* **cli:** add setup command ([f91f163](f91f163))
* **cli:** install plugin modules ([5213ccd](5213ccd))
* **cli:** set modules in temporary inventory ([#74](#74)) ([e99c18e](e99c18e))
* **cli:** validate cli and module configurations ([af8311e](af8311e))
* **cli/docker:** Base image on Ansible 2.10.3 ([6ec83d6](6ec83d6))
* **cli/init:** add version option ([032ab8c](032ab8c))
* **module-api:** add replace provider file ([6ccf1b8](6ccf1b8))
* **schema:** add execute_* container hooks ([3689103](3689103))
* **schema:** add resource_name field to container module config ([ae58168](ae58168))
* **schema:** require terraform provider ([ae2aaae](ae2aaae))
* add CLI base construct and validation command ([4faec4f](4faec4f))
* add container hooks definition ([20684e1](20684e1))
* add container hooks test data ([1137582](1137582))
* add destroy step for modules ([0483681](0483681))
* add modules filter ([3197cb2](3197cb2))
* add pip dependencies to collection ([9d9b916](9d9b916))
* add smoke test to nginx setup ([5240dde](5240dde))
* add version file ([c4bb68c](c4bb68c))
* Ansible collection ([#20](#20)) ([#30](#30)) ([75c47ad](75c47ad))
* install local python dependencies required to use StackHead ([95895db](95895db))
* load module config via custom action ([c27a495](c27a495))
* make container resource name configurable ([724662a](724662a))
* plugin settings in CLI config ([7856f9a](7856f9a))
* setup cron for Terraform updates ([8d1548b](8d1548b))
* setup service instead of crontab ([fba2624](fba2624))
* store project terraform files in project subdirectory ([66519aa](66519aa))
* **action:** container input variable ([f272ae3](f272ae3))
* **module-api:** introduce module_role_path for use within modules ([f82a8fd](f82a8fd))
* **modules/terraform:** make provider initialization configurable ([fb0fa07](fb0fa07))
* **schema:** add schema for StackHead module config file ([d27a9f3](d27a9f3))
* **schema:** add StackHead CLI config schema ([5f522f3](5f522f3))
* **stackhead-api:** load tasks and config directly ([0adb080](0adb080))
* **terraform:** adjust terraform provider install path ([e0a287b](e0a287b))
* **terraform:** upgrade terraform to 0.13.3 ([c062f00](c062f00))
* add stackhead__acme_folder to stackhead_module_api ([69e9416](69e9416))
* adds project validator binary and schema ([f6fa965](f6fa965))
* adjust Terraform nginx file name ([39bc6ad](39bc6ad))
* allow setting docker environment variables via project configuration ([7ab753c](7ab753c))
* change format of services ([6116c5b](6116c5b))
* configuring multiple domains ([#18](#18)) ([92623ba](92623ba))
* create Terraform root folder during provisioning ([8bf5f60](8bf5f60))
* deploy application with stackhead user ([676220a](676220a))
* drop native type ([347a17a](347a17a))
* Expose multiple container ports via reverse proxy ([#17](#17)) ([e151e43](e151e43))
* extract nginx role into external repository ([#37](#37)) ([99ba99b](99ba99b))
* generate docker.tf file from template ([2c16c2c](2c16c2c))
* generate nginx vhost configuration via Terraform ([7f708fc](7f708fc))
* generate snakeoil certificate via Terraform ([#29](#29)) ([f99567f](f99567f))
* generate ssl certificate and htpasswd configuration via Terraform ([ce56961](ce56961))
* GitHub action for integration tests ([#42](#42)) ([a27bf08](a27bf08))
* handle ACME challenges ([56b9421](56b9421))
* modularize container managers ([#39](#39)) ([5f25f7b](5f25f7b))
* **docker:** allow links in service definition ([7626e25](7626e25))
* **docker:** Introduce $DOCKER_SERVICE_NAME ([eca4fa9](eca4fa9))
* **plays:** Destroy application ([7d534ad](7d534ad))
* **webserver:** add configurable webserver setting and Caddy support ([#31](#31)) ([ae8f6d4](ae8f6d4))
* HTTP BasicAuth setting ([8d6c73f](8d6c73f))
* install terraform during provisioning ([2c043cf](2c043cf))
* make containers available on project network per default ([2eeabed](2eeabed))
* rename "docker" type into "container" ([1e3d3f5](1e3d3f5))
* rename "web" type into "native" ([f417a14](f417a14))
* set nginx port from Terraform result ([be6ee09](be6ee09))
* set symlinks for project and run Terraform ([ae7958a](ae7958a))
* use geerlingguy.docker package ([#27](#27)) ([27b7666](27b7666))
* **docker:** downgrade docker-compose config version to 2.8 ([56a5686](56a5686))
* **docker:** process new volume format ([0388b6b](0388b6b))
* **docker:** support user setting on services ([68b18d0](68b18d0))
* **docker:** support volumes_from setting on services ([350f204](350f204))
* **provisioning:** create binary folder and make sure setuptools are installed ([2b16722](2b16722))
* **provisioning:** create Terraform provider configuration ([c587d17](c587d17))
* **schema:** drop native type ([5f778ad](5f778ad))
* add php capabilities for webapp ([3578388](3578388))
* add server-check play ([6a1882c](6a1882c))
* allow installing as Composer or NPM package ([fc10052](fc10052))
* change format of project definition. Re-enable all steps ([7dcd71f](7dcd71f))
* reload nginx after configuration was created ([ea45309](ea45309))
* **provisioning:** install Nginx provider for Terraform ([12a36a6](12a36a6))
* **provisioning:** setup "stackhead" user and group on target system ([bedbc26](bedbc26))
* add license file ([7159c89](7159c89))
* deploy custom fact for software versions ([7a6ac5c](7a6ac5c))
* run playbooks with sudo per default ([680354b](680354b))
* split expose_port into expose setting ([ac640e6](ac640e6))
* **role/config_nginx_docker:** OS-specific variables ([4c77067](4c77067))
* **terraform:** use getstackhead/acme provider ([67868a2](67868a2))

* feat (module-api): drop load-config.yml ([39096a9](39096a9))

### Styles

* rename variables ([99c2747](99c2747))

### BREAKING CHANGES

* Container hooks "after_setup" and "before_destroy" are removed. Use "execute_after_setup" and "execute_before_destroy" instead.
* Terraform files for projects are now stored at /stackhead/terraform/project/ instead of /stackhead/terraform/
* File load-config.yml is removed. Config is loaded without needing the plugin to return it.
* **stackhead-api:** Removes module-main.yml which is not required anymore.
* **terraform:** Terraform provider location changed with Terraform 0.13
* Filters moved from ansible/filter_plugins to ansible/plugins/filter. Adjust your path.
Also using the filter plugins requires to add the prefix "getstackhead.stackhead."

* ci: build and install collection before smoke tests

* docs: drop unused type setting

* style(ansible/plugins): code line length

* chore: move test data variables
* test data variables moved from ansible/__test__/variables.yml to ansible/roles/stackhead_module_api/testdata/variables.yml

* chore: temporarily install collection compatible version of Docker and Nginx module

* test(build): resolve collection file name
* stackhead__webserver is now the name of the role to be used.
nginx = getstackhead.stackhead_webserver_nginx
caddy = stackhead_webserver_caddy
* Native type was dropped. You can only set up container based projects now.
The setting "type" in project definition is not needed anymore.
* Dropped support for Ubuntu 16.04
* - Python 2 support dropped
* Requires adjustment of project configuration.
Turn "expose" into an array of objects.
Rename property "port" into "internal_port" and add a new property "external_port: 80"
* Containers of projects not get automatically connected to an internal per-project-network.
Thus, the "links" setting was removed from project definition and can no longer be used.
* Variablesinside stackhead_project role were renamed:

stackhead__remote_config_folder => stackhead__project_folder
stackhead__remote_config_file => stackhead__project_config_file
* type "docker" was renamed into "container". Please adjust your project definitions accordingly.
Also, rename the data folder with the Docker data from docker_data to container_data in project directories on servers.
* type "web" was renamed into "native".
Please adjust your project definitions accordingly.
* Composer and NPM package name changed to @getstackhead/stackhead.
* Ansible playbooks are now inside ./ansible folder not on root anymore.
Adjust your commands accordingly.

e.g. before it was vendor/getstackhead/deployment/application-deploy.yml
now it is: vendor/getstackhead/deployment/ansible/application-deploy.yml
* Docker services are now an array instead of a dict/hash.
Adjust your YAML file by moving the hash key into a new property "name"

Before:

services:
  myservice:
    image: myimage

After:

services:
  - name: myservice
    image: myimage
@stackhead-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action/integration-test PRs with this label be integration tested deployment Something about application deployment documentation Improvements or additions to documentation released setup Something about server setup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modularity

2 participants