Sha256: 5b7aaa4217594b507b93dc05a4fe5830f731beb92a96da5f6d331dcc15e76261

Contents?: true

Size: 1.88 KB

Versions: 20

Compression:

Stored size: 1.88 KB

Contents

#!/usr/bin/env ruby

require 'smartcloud'

if ARGV[0] == 'init'
	Smartcloud::Boot.init
elsif !Smartcloud::Boot.initialized?
	puts "Smartcloud has not been initialized. Please run command 'smartcloud init'."
	exit
end

# if ARGV[0] == 'new'
# 	machine = Smartcloud::Machine.new
# 	raise "Please specify machine name" unless ARGV[1]
# 	machine.create(ARGV[1])
# elsif ARGV[0] == 'install'
# 	machine = Smartcloud::Machine.new
# 	machine.install_docker
# 	machine.install_engine
# elsif ARGV[0] == 'uninstall'
# 	machine = Smartcloud::Machine.new
# 	machine.uninstall_engine
# 	machine.uninstall_docker
# elsif ARGV[0] == 'run'
# 	machine = Smartcloud::Machine.new
# 	ARGV.shift
# 	raise "Please specify command to run" unless ARGV[0]
# 	machine.run(ARGV)

if ARGV[0] == 'docker'
	if ARGV[1] == 'install'
		Smartcloud::Docker.install
	elsif ARGV[1] == 'uninstall'
		Smartcloud::Docker.uninstall
	end
elsif ARGV[0] == 'grids'
	if ARGV[1] == 'runner'
		if ARGV[2] == 'up'
			Smartcloud::Grids::Runner.up
		elsif ARGV[2] == 'down'
			Smartcloud::Grids::Runner.down
		end
	elsif ARGV[1] == 'mysql'
		if ARGV[2] == 'up'
			Smartcloud::Grids::Mysql.up(ARGV[3])
		elsif ARGV[2] == 'down'
			Smartcloud::Grids::Mysql.down
		end
	elsif ARGV[1] == 'nginx'
		if ARGV[2] == 'up'
			Smartcloud::Grids::Nginx.up(ARGV[3])
		elsif ARGV[2] == 'down'
			Smartcloud::Grids::Nginx.down
		end
	elsif ARGV[1] == 'solr'
		if ARGV[2] == 'up'
			Smartcloud::Grids::Solr.up(ARGV[3])
		elsif ARGV[2] == 'down'
			Smartcloud::Grids::Solr.down
		elsif ARGV[2] == 'create_core'
			Smartcloud::Grids::Solr.create_core(ARGV[3])
		elsif ARGV[2] == 'destroy_core'
			Smartcloud::Grids::Solr.destroy_core(ARGV[3])
		end
	end
# elsif ARGV[0] == 'user'
# 	if ARGV[1] == 'create'
# 		Smartcloud::User.create(ARGV[2], ARGV[3], ARGV[4])
# 	elsif ARGV[1] == 'destroy'
# 		Smartcloud::User.destroy(ARGV[2], ARGV[3])
# 	end
else
	puts "Specify a command to execute."
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
smartcloud-0.1.0 bin/smartcloud
smartcloud-0.1.0.rc4 bin/smartcloud
smartcloud-0.1.0.rc3 bin/smartcloud
smartcloud-0.1.0.rc2 bin/smartcloud
smartcloud-0.1.0.rc1 bin/smartcloud
smartcloud-0.1.0.beta5 bin/smartcloud
smartcloud-0.1.0.beta4 bin/smartcloud
smartcloud-0.1.0.beta3 bin/smartcloud
smartcloud-0.1.0.beta2 bin/smartcloud
smartcloud-0.1.0.beta1 bin/smartcloud
smartcloud-0.0.210 bin/smartcloud
smartcloud-0.0.209 bin/smartcloud
smartcloud-0.0.208 bin/smartcloud
smartcloud-0.0.207 bin/smartcloud
smartcloud-0.0.206 bin/smartcloud
smartcloud-0.0.205 bin/smartcloud
smartcloud-0.0.204 bin/smartcloud
smartcloud-0.0.203 bin/smartcloud
smartcloud-0.0.202 bin/smartcloud
smartcloud-0.0.201 bin/smartcloud