Elders / Pandora

Pandora was the first human woman in Greek mythology. She was created by the gods Hephaestus and Athena, following the instructions of Zeus, who wanted to punish Prometheus for stealing the fire from the gods to give it to humans. After Prometheus stole the fire and humans gratefully accepted the gift, Zeus decided to give humans a gift that would balance their acquisition of fire. He asked Hephaestus to create the first woman, who would be endowed with numerous seducing gifts that would plague humanity from then on. Athena dressed Pandora in a beautiful silvery gown, a veil and a crown, and taught her weaving. Other gods also contributed to Pandora's creation, by endowing her with such gifts as deceitful nature and a speech of lies. However, the natural gifts of Pandora were not the problem for humanity. The gods also offered her a jar that held within numerous evils, diseases and other pains. With the jar in hand, Pandora was given to Epimetheus, Prometheus' brother, who accepted the divine gift despite his brother's warnings. One day, out of curiosity and not of malice, Pandora opened the lid of the jar, releasing all evils into the world. Shocked by what had happened, she quickly tried to put the lid back, only managing to trap Hope in it. This is how the ancient Greeks believed there was evil in the world. The event of releasing the evils into the world marks the end of the so-called Golden Age of Man in the world, and the beginning of the Silver Age.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pandora aims to externalize the application configuration. Usually in .NET projects the configuration is done in app/web.config with transformations.

The problem arises when production configuration is needed which should not be part of the application repository because it is an OSS project for example. This is where Pandora comes. You can configure the application using the following structure and store these files in a separate repository:

ReferenceConfiguration.json

{
    "name": "ReferenceConfiguration",
    "defaults": {
        "refSetting0": "refSetting0",
        "refSetting1": "refSetting1",
        "refSetting2": "refSetting2"
    },
    "clusters": {
        "local": {
            "refSetting0": "int_refSetting0",
            "refSetting1": "int_refSetting1",
            "refSetting2": "int_refSetting2"
        },
        "test": {
            "refSetting0": "test_refSetting0",
            "refSetting1": "test_refSetting1",
            "refSetting2": "test_refSetting2"
        }
    },
    "machines": {
        "COMPUTERNAME": {
            "refSetting0": "machine_refSetting0"
        }
    }
}

SampleConfiguration.json

{
    "name": "SampleConfiguration",
    "references": [
        { "jar": "ReferenceConfiguration.json" }
    ],
    "defaults": {
        "setting0": "setting0",
        "setting1": "setting1",
        "setting2": "setting2"
    },
    "clusters": {
        "local": {
            "setting0": "int_setting0",
            "setting1": "int_setting1",
            "setting2": "int_setting2"
        },
        "test": {
            "setting0": "test_setting0",
            "setting1": "test_setting1",
            "setting2": "test_setting2"
        }
    },
    "machines": {
        "COMPUTERNAME": {
            "cluster": "local",
            "setting0": "int_setting0",
            "setting1": "int_setting1",
            "setting2": "int_setting2"
        }
    }
}
  • jar file: this is the file containing configuration. In this case SampleConfiguration.json
  • name: The application name. The recommended approach is to name the jar file with the same name
  • defaults: defines configuration keys for the current application and sets default values
  • clusters: defines different environment configurations where the application will be deployed. Here local is the dev environment and test is the place for QA
  • machines: defines configurations for specific machine inside a cluster. The COMPUTERNAME is the default ENV VAR in windows.
  • references: merges two jar files. Same rules apply here. You are not allowed to have the duplicate keys in ref and main jars

In order to install the configurations you will have to use Pandora.Cli. By default the configurations are applied and stored in environment variables.

About

Pandora was the first human woman in Greek mythology. She was created by the gods Hephaestus and Athena, following the instructions of Zeus, who wanted to punish Prometheus for stealing the fire from the gods to give it to humans. After Prometheus stole the fire and humans gratefully accepted the gift, Zeus decided to give humans a gift that would balance their acquisition of fire. He asked Hephaestus to create the first woman, who would be endowed with numerous seducing gifts that would plague humanity from then on. Athena dressed Pandora in a beautiful silvery gown, a veil and a crown, and taught her weaving. Other gods also contributed to Pandora's creation, by endowing her with such gifts as deceitful nature and a speech of lies. However, the natural gifts of Pandora were not the problem for humanity. The gods also offered her a jar that held within numerous evils, diseases and other pains. With the jar in hand, Pandora was given to Epimetheus, Prometheus' brother, who accepted the divine gift despite his brother's warnings. One day, out of curiosity and not of malice, Pandora opened the lid of the jar, releasing all evils into the world. Shocked by what had happened, she quickly tried to put the lid back, only managing to trap Hope in it. This is how the ancient Greeks believed there was evil in the world. The event of releasing the evils into the world marks the end of the so-called Golden Age of Man in the world, and the beginning of the Silver Age.

License:Apache License 2.0


Languages

Language:C# 97.1%Language:JavaScript 1.7%Language:Batchfile 1.2%