[ 
https://issues.apache.org/jira/browse/BIGTOP-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14200844#comment-14200844
 ] 

jay vyas commented on BIGTOP-1517:
----------------------------------

Hi cos  ...... YAML is just like json.  It is native to ruby, so in Vagrantfile 
you have: 

{noformat}
require 'yaml'
@cluster = YAML.load_file('cluster.yml')
puts @cluster.inspect
## Read in by Vagrantfile...
TOTAL=@cluster['TOTAL']
{noformat} 

meanwhile *cluster.yml* looks like this : 

{noformat}
TOTAL: 3
ip:
OFFSET: 10
PREFIX: '172.31.16'
HOST: 'ip-172-31-16-'
NODE:
- default: 'm1.small'
MASTER: 'master.rhbd'
SUBNET: 'subnet-ad2d2ceb'
AMI: 'ami-759dcb74'
REGION: 'ap-northeast-1'
SERVERS: !!omap
master:
type: "m1.small"
slave:
type: "m1.small"
masters:
- 0
slaves: #slaves nodes i->j
- 1
- 2
- 3 
{noformat} 

Then, in vagrant , or any ruby program I can easily read this file like so , 

{noformat}



> refactor vagrant provisioners to be configurable by yaml file
> -------------------------------------------------------------
>
>                 Key: BIGTOP-1517
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-1517
>             Project: Bigtop
>          Issue Type: Improvement
>          Components: deployment
>    Affects Versions: 0.8.0
>            Reporter: Evans Ye
>            Priority: Minor
>
> In order to update the configurations of our Bigtop Hadoop 
> provisioners(docker-puppet and vagrant-puppet), we need to modify its 
> Vagrantfile directly. It would be better to have a yaml file for 
> configuration management which consolidate all the things we typically care 
> about when provisioning a cluster.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to