-
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
13 changed files
with
181 additions
and
63 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,61 @@ | ||
#!/usr/bin/env python3 | ||
# PYTHON_ARGCOMPLETE_OK | ||
|
||
from typing import List | ||
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: obsah.ApplicationConfig) -> str: | ||
""" | ||
Return the data path. Houses playbooks and configs. | ||
""" | ||
return (cls.data_path() / 'pipelines').as_posix() | ||
|
||
@classmethod | ||
def playbooks(cls: obsah.ApplicationConfig) -> List[obsah.Playbook]: | ||
""" | ||
Return all playbooks in the playbook path. | ||
""" | ||
paths = Path(cls.playbooks_path()).glob('*/*.yaml') | ||
return sorted(obsah.Playbook(playbook_path.as_posix(), cls) for playbook_path in paths | ||
if playbook_path.stem == playbook_path.parent.name) | ||
|
||
@classmethod | ||
def inventory_path(cls) -> str: | ||
""" | ||
Return the inventory path | ||
""" | ||
return (cls.data_path() / 'inventories').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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- import_playbook: 01-boxes.yaml | ||
- import_playbook: 02-setup.yaml | ||
- import_playbook: 03-install_server.yaml | ||
- import_playbook: 04-install_proxy.yaml | ||
- import_playbook: 05-tests.yaml | ||
- import_playbook: 06-smoker.yaml |
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,17 @@ | ||
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
help: | | ||
Run a Pulpcore 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 |
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,3 @@ | ||
- import_playbook: 01-boxes.yaml | ||
- import_playbook: 02-install.yaml | ||
- import_playbook: 03-tests.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- import_playbook: 01-boxes.yaml | ||
- import_playbook: 02-setup.yaml | ||
- import_playbook: 03-install_server.yaml | ||
- import_playbook: 04-install_proxy.yaml | ||
- import_playbook: 05-server_to_intermediate.yaml | ||
- import_playbook: 06-proxy_to_intermediate.yaml | ||
- import_playbook: 07-server_to_final.yaml | ||
- import_playbook: 08-proxy_to_final.yaml | ||
- import_playbook: 09-tests.yaml | ||
- import_playbook: 10-smoker.yaml |
This file was deleted.
Oops, something went wrong.
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