-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
183 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/env python3 | ||
# PYTHON_ARGCOMPLETE_OK | ||
|
||
from pathlib import Path | ||
|
||
import obsah | ||
|
||
|
||
class ApplicationConfig(obsah.ApplicationConfig): | ||
""" | ||
A class describing the where to find various files | ||
""" | ||
|
||
@staticmethod | ||
def name() -> str: | ||
""" | ||
Return the name as shown to the user in the ArgumentParser | ||
""" | ||
return 'forklift' | ||
|
||
@staticmethod | ||
def target_name() -> str: | ||
""" | ||
Return the name of the target in the playbook if the playbook takes a parameter. | ||
""" | ||
return 'pipeline' | ||
|
||
@staticmethod | ||
def data_path() -> Path: | ||
""" | ||
Returns the root of the project | ||
""" | ||
return Path(__file__).absolute().parent.parent | ||
|
||
@classmethod | ||
def playbooks_path(cls) -> str: | ||
""" | ||
Return the data path. Houses playbooks and configs. | ||
""" | ||
return (cls.data_path() / 'pipelines').as_posix() | ||
|
||
@classmethod | ||
def inventory_path(cls) -> str: | ||
""" | ||
Return the inventory path | ||
""" | ||
return (cls.data_path() / 'package_manifest.yaml').as_posix() | ||
|
||
|
||
if __name__ == '__main__': | ||
obsah.main(application_config=ApplicationConfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
help: | | ||
Run an install pipeline | ||
variables: | ||
forklift_state: | ||
parameter: --state | ||
help: Forklift state to ensure | ||
# TODO: up/rebuild/destroy | ||
pipeline_os: | ||
parameter: --os | ||
help: Operating system to install, like centos7, debian10 or ubuntu1804 | ||
pipeline_type: | ||
parameter: --type | ||
help: Type of pipeline, like foreman, katello or luna | ||
# TODO: choices: foreman/katello/luna | ||
pipeline_version: | ||
parameter: --version | ||
help: Version to install, like nightly, 1.24 or 3.14 | ||
|
1 change: 1 addition & 0 deletions
1
pipelines/vars/install_base.yml → pipelines/install/vars/base.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
forklift_directory: "{{ playbook_dir | dirname | dirname }}" | ||
forklift_name: "pipeline-{{ pipeline_type }}-{{ pipeline_version }}-{{ pipeline_os }}" | ||
forklift_server_name: "pipeline-{{ pipeline_type }}-server-{{ pipeline_version }}-{{ pipeline_os }}" | ||
forklift_proxy_name: "pipeline-{{ pipeline_type }}-proxy-{{ pipeline_version }}-{{ pipeline_os }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
help: | | ||
Run an upgrade pipeline | ||
variables: | ||
forklift_state: | ||
parameter: --state | ||
help: Forklift state to ensure | ||
# TODO: up/rebuild/destroy | ||
pipeline_os: | ||
parameter: --os | ||
help: Operating system to install, like centos7, debian10 or ubuntu1804 | ||
pipeline_type: | ||
parameter: --type | ||
help: Type of pipeline, like foreman, katello or luna | ||
# TODO: choices: foreman/katello/luna | ||
pipeline_version: | ||
parameter: --version | ||
help: Version to install, like nightly, 1.24 or 3.14 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
pipelines/vars/upgrade_base.yml → pipelines/upgrade/vars/base.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters