Class: Vagrant::Smartos::Zones::Cap::ZoneGate::Install
- Inherits:
-
Base
- Object
- Base
- Vagrant::Smartos::Zones::Cap::ZoneGate::Install
show all
- Defined in:
- lib/vagrant/smartos/zones/cap/zone_gate/install.rb
Constant Summary
collapse
- LOCAL_FILES_FOLDER =
File.expand_path('../../../../../../../files', __FILE__)
- LOCAL_ZONEGATE_FOLDER =
File.join(LOCAL_FILES_FOLDER, 'zonegate')
- LOCAL_SMF_MANIFEST =
File.join(LOCAL_FILES_FOLDER, 'smf', 'zonegate.xml')
- SMF_TMP_FOLDER =
'/usbkey/vagrant'
- SMF_FOLDER =
'/opt/custom/smf'
- ZONEGATE_FOLDER =
'/opt/custom/method'
Instance Attribute Summary
Attributes inherited from Base
#machine
Instance Method Summary
collapse
Methods inherited from Base
cap_method, #initialize, #sudo, #ui
Instance Method Details
#create_zonegate_folder ⇒ Object
26
27
28
29
|
# File 'lib/vagrant/smartos/zones/cap/zone_gate/install.rb', line 26
def create_zonegate_folder
machine.communicate.execute("#{sudo} mkdir -p %s/zonegate" % ZONEGATE_FOLDER)
machine.communicate.execute("#{sudo} chown vagrant:other %s/zonegate" % ZONEGATE_FOLDER)
end
|
#execute ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/vagrant/smartos/zones/cap/zone_gate/install.rb', line 18
def execute
ui.info 'Installing ZoneGate'
create_zonegate_folder
upload_zonegate
install_zonegate
end
|
#install_zonegate ⇒ Object
37
38
39
40
41
|
# File 'lib/vagrant/smartos/zones/cap/zone_gate/install.rb', line 37
def install_zonegate
machine.communicate.execute("#{sudo} mv %s/zonegate.xml %s/zonegate.xml" % [SMF_TMP_FOLDER, SMF_FOLDER])
machine.communicate.execute("#{sudo} chown root:root %s/zonegate.xml" % SMF_FOLDER)
machine.communicate.execute("#{sudo} svccfg import %s/zonegate.xml" % SMF_FOLDER)
end
|
#upload_zonegate ⇒ Object