Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Upate README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Boardwell committed Feb 8, 2021
1 parent 5f188b1 commit b22fe1c
Showing 1 changed file with 61 additions and 55 deletions.
116 changes: 61 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# Platform Utils

## Structure
## General Installation

One shot install:

```shell
curl -fsSL -H "Cache-Control: no-cache" "https://raw.githubusercontent.com/Datameer-Inc/platform-utils/master/init.sh" | bash
```

This can also be placed in a cron job to pull latest `init.sh`, chmod, and execute

## Util Scripts

The general scripts contain scripts to

### Scripts
- install ansible
- configuration playbooks for various components

Example structure (NOTE: may not be completely up to date)

```shell
init.sh
Expand All @@ -11,44 +26,42 @@ tools
- datadog
- process.sh
- component
- basic
- basic.sh
- basic.yaml
- emr
- playbook.yaml
- master-node.sh
- master-node.yaml
- core-node.sh
- core-node.yaml
- task-node.sh
- task-node.yaml
- spotlight
- playbook.yaml
- toolx
- spotlight.sh
- spotlight.yaml
- toolX
- process.sh
- component
- emr
- playbook.yaml
- spotlight
- playbook.yaml
- compX
- compX.sh
- compX.yaml
- ...
- ...
```

### Local Config
## Local Config

The configuration files local to the instance

- `.env`
e.g.

- `/config-files/platform-utils/datadog/.env`
- holds env vars used by the playbooks above.
- tools process.sh called when this file is found.
- `playbook.yaml` (OPTIONAL)
- custom playbook to use if necessary.
- `/config-files/platform-utils/datadog/components/emr/master-node.sh` (OPTIONAL)

```shell
tools
- datadog
- .env
- component
- emr
- playbook.yaml
- spotlight
- playbook.yaml
- toolx
- .env
- component
- emr
- playbook.yaml
- spotlight
- playbook.yaml
```
`/config-files/platform-utils/datadog/components/emr/master-node.yaml` (OPTIONAL)
- custom playbook to use if necessary.

## Makefile Targets

Expand All @@ -70,7 +83,7 @@ Targets:
```
<!-- END makefile-doc -->
## Scripts
## Util Scripts in Details
### `init.sh`
Expand All @@ -89,45 +102,38 @@ Spotlight-utils version mgmt
### `tools` directory
Installation - CRUD - scripts for the various tools
Installation/management scripts for the various tools.
### `tools/xxxxxxx/component`
n/a at the moment (a decision needs to be made on how to deliver configs)
Components created based on the type and use of instance. A `basic` profile is provided along with some specialised component profiles.
## Tool Configuration
Example for datadog.
In order to activate a tool, a `.env` file needs to be added with the appropriate environment variable, e.g.
Under `/config-files/platform-utils/datadog` I could imagine the following
```shell
$ cat /config-files/platform-utils/datadog/.env
```
/config-files/platform-utils/datadog
- datadog.properties
- datadog.yaml
- conf.d
DD_AGENT_ENABLED=true
```
Where datadog.properties contains
To use a custom ansible configuration, simply place an equivalent file in the same relative path, e.g.
```shell
DD_AGENT_ENABLED=true/false
# and possibly...
DD_AGENT_MAJOR_VERSION=7
/config-files/platform-utils/datadog/.env
/config-files/platform-utils/datadog/component/emr/master-node.sh
/config-files/platform-utils/datadog/component/emr/master-node.yaml
```
### Default Configurations per Component
See the `OPTIONAL TODO` above. The idea here would be to have a default/global config per component which can be changed gloablly w/o having to update all the individual instances.
## Testing
The `/config-files/platform-utils/datadog/datadog.properties` could then include a simple
Automated testing to be defined and implemented.
```shell
DD_AGENT_ENABLED=true/false
```
You can find Vagrant file with a list of commands used to test configurations.
and the default configs would take care of the rest.
## General Installation
General steps:
- cron job to pull latest `init.sh`, chmod, and execute
- `vagrant up`
- `vagrant ssh`
- Use the commands to run and test the scripts in an isolated environment.

0 comments on commit b22fe1c

Please sign in to comment.