Class: Pec::Init
- Inherits:
-
Object
- Object
- Pec::Init
- Defined in:
- lib/pec/init.rb
Class Method Summary collapse
Class Method Details
.create_sample_config ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/pec/init.rb', line 15 def create_sample_config unless File.exist?("Pec.yaml") open("Pec.yaml","w") do |e| YAML.dump(Pec::Configure::Sample.pec_file, e) end puts "create configure file Pec.yaml".green end end |
.create_template_dir ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/pec/init.rb', line 4 def create_template_dir dirname = "user_data" unless FileTest.exist?(dirname) FileUtils.mkdir_p(dirname) open("#{dirname}/web_server.yaml.sample","w") do |e| YAML.dump(Pec::Configure::Sample.user_data, e) end if FileTest.exist?(dirname) puts "create directry user_data".green end end |
.show_env_setting ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/pec/init.rb', line 24 def show_env_setting thor = Thor.new thor.say("please set env this paramater", :yellow) puts " export OS_AUTH_URL=http://your_keystone_server:port/v2.0" puts " export OS_USERNAME=your name" puts " export OS_PASSWORD=your password" end |