Skip to content

teracyhq-incubator/teracy-dev-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teracy-dev-core

The core extension for teracy-dev which supports all options from vagrant for teracy-dev yaml configuration format.

How to use

Prerequisites:

By default, teracy-dev is already configured to use this extension, however you can override the configuration with your own, for example, to use a different version or a forked repo.

To override the built-in version, create workspace/teracy-dev-entry/config_default.yaml with the following similar content:

  • Use specific version:
teracy-dev:
  extensions:
    - _id: "kernel-core"
      path:
        extension: teracy-dev-core
      location:
        git:
          remote:
            origin: https://github.com/teracyhq-incubator/teracy-dev-core.git
          branch: v0.3.0
      require_version: ">= 0.3.0"
  • Use the latest stable version (auto update):
teracy-dev:
  extensions:
    - _id: "kernel-core"
      path:
        extension: teracy-dev-core
      location:
        git:
          remote:
            origin: https://github.com/teracyhq-incubator/teracy-dev-core.git
          branch: master
      require_version: ">= 0.4.0"
  • Use the latest develop version (auto update):
teracy-dev:
  extensions:
    - _id: "kernel-core"
      path:
        extension: teracy-dev-core
      location:
        git:
          remote:
            origin: https://github.com/teracyhq-incubator/teracy-dev-core.git
          branch: develop
      require_version: ">= 0.5.0-SNAPSHOT"
  • Run vagrant up or vagrant reload --provision (if your vagrant machine is running) to apply your configuration.

How to develop

You should configure the forked git repo into the workspace directory by adding the following similar content into workspace/teracy-dev-entry/config_override.yaml:

teracy-dev:
  extensions:
    - _id: "kernel-core"
      path:
        lookup: workspace
      location:
        git:
          remote:
            origin: <fill your forked repo here>
            upstream: https://github.com/teracyhq-incubator/teracy-dev-core.git
        branch: develop
      require_version: ">= 0.5.0-SNAPSHOT"
  • Run vagrant up or vagrant reload --provision (if your vagrant machine is running) to apply your configuration.

Supported configurations

These are the supported configurations in teracy-dev-core, you can configure them in the workspace/teracy-dev-entry/config_override.yaml:

  • Variables

    • variables are used to define dynamic configuration values for use in configuration files. After setting them, you can call them by %{env_key}.

    • You can define variable keys with environment variables. The following is the configuration format:

      variables:
        key: ${ENV_VAR}
        key: ${ENV_VAR-:default}
        key: value
      # and "%{key}" can be used for settings values if available
  • Plugins

    vagrant:
      plugins:
        - _id: # unique plugin id
        name: # plugin name. you can see list plugin here: https://github.com/hashicorp/vagrant/wiki/Available-Vagrant-Plugins
        version: "" # default use latest version if empty
        enabled: true
        env_local: # true / false. default is false to use global plugin.
        state: "" # if not set, do nothing. Another state: installed, uninstalled
  • Nodes

    • These are configurations for each node.

    • The following is the configuration format:

    nodes:
      - _id: # unique node id. All configuration of this node must have same '_id'
      name: # machine name
      vm: # box configure
      providers:
      ssh:
      provisioners:
    
      # another node
      - _id: # unique node id
      name: # machine name
      vm: # box configure
      providers:
      ssh:
      provisioners: