vps_cli 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,137 @@
1
+ # frozen_string_literal: true
2
+
3
+ module VpsCli
4
+ OMZ_DIR = File.join(Dir.home, '.oh-my-zsh')
5
+ OMZ_PLUGINS = File.join(OMZ_DIR, 'custom', 'plugins')
6
+ # Installes the required packages
7
+ class Install
8
+ def self.full
9
+ unless OS.linux?
10
+ puts 'You are not running on linux. No packages installed.'
11
+ return
12
+ end
13
+
14
+ begin
15
+ all_install
16
+ rescue RuntimeError => exception
17
+ VpsCli.errors << exception
18
+ end
19
+ end
20
+
21
+ def self.all_install
22
+ prep
23
+ packages
24
+ other_tools
25
+ neovim_pip
26
+ omz_full_install
27
+ Setup.full
28
+ install_tmux_plugin_manager_and_plugins
29
+ plug_install_vim_neovim
30
+ install_gems
31
+ end
32
+
33
+ def self.prep
34
+ Rake.sh('sudo apt-get update')
35
+ Rake.sh('sudo apt-get upgrade -y')
36
+ Rake.sh('sudo apt-get dist-upgrade -y')
37
+ end
38
+
39
+ def self.packages
40
+ Packages::UBUNTU.each do |item|
41
+ Rake.sh("sudo apt-get install -y #{item}")
42
+
43
+ puts 'Successfully completed apt-get install on all packages.'
44
+ end
45
+ end
46
+
47
+ def self.other_tools
48
+ # update npm, there are some issues with ubuntu 18.10 removing npm
49
+ # and then being unable to update it
50
+ # for some reason npm and ubuntu dont play well
51
+ Rake.sh('sudo apt-get install nodejs -y')
52
+ Rake.sh('sudo apt-get install npm -y')
53
+ Rake.sh('sudo npm install -g npm')
54
+
55
+ # add heroku
56
+ Rake.sh('sudo snap install heroku --classic')
57
+ # add tmux plugin manager
58
+ tmp_plugins = File.join(Dir.home, '.tmux', 'plugins', 'tpm')
59
+ unless Dir.exist?(tmp_plugins)
60
+ Rake.mkdir_p(tmp_plugins)
61
+ Rake.sh('git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm')
62
+ end
63
+ # add ngrok
64
+ Rake.sh('sudo npm install --unsafe-perm -g ngrok')
65
+
66
+ # add docker
67
+ username = Dir.home.split('/')[2]
68
+ begin
69
+ Rake.sh('groupadd docker')
70
+ Rake.sh("usermod -aG docker #{username}")
71
+ rescue RuntimeError
72
+ puts 'docker group already exists.'
73
+ puts 'moving on...'
74
+ end
75
+ end
76
+
77
+ def self.neovim_pip
78
+ Rake.sh('sudo -H pip2 install neovim --system')
79
+ Rake.sh('sudo -H pip3 install neovim --system')
80
+ Rake.sh(%(yes "\n" | sudo npm install -g neovim))
81
+ end
82
+
83
+ def self.omz_full_install
84
+ install_oh_my_zsh
85
+ install_syntax_highlighting
86
+ install_autosuggestions
87
+ end
88
+
89
+ def self.install_oh_my_zsh
90
+ return if Dir.exist?(OMZ_DIR)
91
+
92
+ Rake.sh('git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh')
93
+ Rake.sh(%(sudo usermod --shell /bin/zsh "$USER"))
94
+ end
95
+
96
+ def self.install_autosuggestions
97
+ auto = File.join(OMZ_PLUGINS, 'zsh-autosuggestions')
98
+ return if File.exist?(auto)
99
+
100
+ Rake.sh("git clone https://github.com/zsh-users/zsh-autosuggestions #{auto}")
101
+ end
102
+
103
+ def self.install_syntax_highlighting
104
+ syntax = File.join(OMZ_PLUGINS, 'zsh-syntax-highlighting')
105
+ return if File.exist?(syntax)
106
+
107
+ Rake.sh("git clone https://github.com/zsh-users/zsh-syntax-highlighting.git #{syntax}")
108
+ end
109
+
110
+ def self.plug_install_vim_neovim
111
+ Rake.sh(%(vim +'PlugInstall --sync' +qa))
112
+ Rake.sh(%(vim +'PlugUpdate --sync' +qa))
113
+ Rake.sh(%(nvim +'PlugInstall --sync' +qa))
114
+ Rake.sh(%(nvim +'PlugUpdate --sync' +qa))
115
+ end
116
+
117
+ def self.install_tmux_plugin_manager_and_plugins
118
+ install_path = File.join(Dir.home, '.tmux', 'plugins', 'tpm')
119
+ unless File.exist?(install_path)
120
+ Rake.mkdir_p(install_path)
121
+ Rake.sh("git clone https://github.com/tmux-plugins/tpm #{instal_path}")
122
+ end
123
+ # start a server but don't attach to it
124
+ Rake.sh('tmux start-server')
125
+ # create a new session but don't attach to it either
126
+ Rake.sh('tmux new-session -d')
127
+ # install the plugins
128
+ Rake.sh('~/.tmux/plugins/tpm/scripts/install_plugins.sh')
129
+ # killing the server is not required, I guess
130
+ Rake.sh('tmux kill-server')
131
+ end
132
+
133
+ def self.install_gems
134
+ Packages::GEMS.each { |g| Rake.sh("gem install #{g}") }
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module VpsCli
4
+ class Packages
5
+ LANGUAGES = %w[python3 python3-pip python-dev
6
+ python3-dev python-pip python3-neovim
7
+ nodejs golang ruby ruby-dev].freeze
8
+
9
+ TOOLS = %w[curl tmux git vim zsh sqlite3 ctags rdoc libsqlite3-dev
10
+ openssh-client openssh-server dconf-cli gnome-terminal
11
+ postgresql pry rubygems fail2ban node-gyp
12
+ libcurl4-openssl-dev libxml2-dev].freeze
13
+
14
+ ADDED_REPOS = %w[neovim asciinema docker mosh yarn].freeze
15
+
16
+ GEMS = %w[colorls neovim rake pry
17
+ rubocop gem-ctags rails yard
18
+ thor bundler].freeze
19
+
20
+ UBUNTU = LANGUAGES.dup.concat(TOOLS).concat(ADDED_REPOS)
21
+ end
22
+ end
@@ -0,0 +1,110 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rake'
4
+ require 'vps_cli/helpers/file_helper'
5
+
6
+ module VpsCli
7
+ # Pull changes from local dir into config dir
8
+ # to be able to push changes up to the config dir
9
+ class Pull
10
+ # Base pull method
11
+ # @param config [VpsCli::Configuration] The configuration to use
12
+ # @see VpsCli::Configuration
13
+ def self.all(config = VpsCli.configuration)
14
+ # pulls dotfiles into specified directory
15
+ dotfiles(config)
16
+
17
+ # pulls from config.local_sshd_config
18
+ sshd_config(config)
19
+
20
+ # pulls via dconf
21
+ gnome_terminal_settings(config)
22
+ end
23
+
24
+
25
+ # Pulls dotfiles from config.local into your
26
+ # specified config.dotfiles location
27
+ def self.dotfiles(config = VpsCli.configuration)
28
+
29
+ common_dotfiles(config.dotfiles,
30
+ config.local_dir) do |remote_file, local_file|
31
+ copy_file_or_dir(local_file, remote_file)
32
+ end
33
+ end
34
+
35
+ # Puts you at the point of a directory where the
36
+ # local file and dotfile are the same allowing you to
37
+ # copy them
38
+ def self.common_dotfiles(dotfiles_dir, local_dir)
39
+ Dir.each_child(dotfiles_dir) do |remote_file|
40
+ Dir.each_child(local_dir) do |local_file|
41
+ next unless local_file == ".#{remote_file}"
42
+
43
+ remote_file = File.join(dotfiles_dir, remote_file)
44
+ local_file = File.join(local_dir, local_file)
45
+ yield(remote_file, local_file)
46
+ end
47
+ end
48
+ end
49
+
50
+ # Differentiates between files and dirs to appropriately copy them
51
+ # Uses Rake.cp_r for directories, uses Rake.cp for simple files
52
+ # @param orig_file [File, Dir] File or Dir you're copying from
53
+ # @param new_file [File, Dir] File or Dir you're copying to
54
+ # @param verbose [Boolean]
55
+ def self.copy_file_or_dir(orig_file, new_file)
56
+ if File.directory?(orig_file) && File.directory?(new_file)
57
+ # Rake.cp_r(orig_file, new_file)
58
+ Dir.each_child(orig_file) do |o_file|
59
+ Dir.each_child(new_file) do |n_file|
60
+ next unless o_file == n_file
61
+
62
+
63
+ o_file = File.join(File.expand_path(orig_file), o_file)
64
+ n_file = File.expand_path(new_file)
65
+
66
+ Rake.cp_r(o_file, n_file)
67
+ end
68
+ end
69
+ else
70
+ Rake.cp(orig_file, new_file)
71
+ end
72
+ end
73
+
74
+ # Pulls sshd_config from config.local_sshd_config into config.misc_files
75
+ def self.sshd_config(config = Configuration.new)
76
+ local = config.local_sshd_config
77
+ remote = config.misc_files
78
+
79
+ copy_file_or_dir(local, remote)
80
+ end
81
+
82
+ # Pulls the local config of gnome into the given config.misc_files
83
+ def self.gnome_terminal_settings(config = VpsCli.configuration)
84
+ # This is where dconf stores gnome terminal
85
+ gnome_dconf = '/org/gnome/terminal/'
86
+ remote_settings = File.join(config.misc_files,
87
+ 'gnome_terminal_settings')
88
+
89
+ orig_remote_contents = File.read(remote_settings)
90
+
91
+ Rake.sh("dconf dump #{gnome_dconf} > #{remote_settings}")
92
+ rescue RuntimeError => error
93
+ VpsCli.errors << error
94
+ # if dconf errors, it will erase the config file contents
95
+ # So this protects against that
96
+ reset_to_original(remote_settings, orig_remote_contents)
97
+ else
98
+ puts "Successfully dumped Gnome into #{remote_settings}" if config.verbose
99
+ end
100
+
101
+ # Method intended for dealing with the way dconf will automatically
102
+ # rewrite a file and make it empty
103
+ # @param remote_settings [File] File located in your repo
104
+ # @param orig_remote_contents [String] The String to be written to
105
+ # remote settings
106
+ def self.reset_to_original(remote_settings, orig_remote_contents)
107
+ File.write(remote_settings, orig_remote_contents)
108
+ end
109
+ end
110
+ end
@@ -0,0 +1,105 @@
1
+ # frozen_string_literal: true
2
+
3
+ module VpsCli
4
+ # Various setup to include ufw firewalls, adding repos, adding fonts etc
5
+ class Setup
6
+ # checks if the user has sudo privileges via uid
7
+ def self.privileged_user?
8
+ Process.uid.zero?
9
+ end
10
+
11
+ # checks if a user is root
12
+ def self.root?
13
+ privileged_user? && Dir.home == '/root'
14
+ end
15
+
16
+ # Runs the full setup process
17
+ # @see #ufw_setup
18
+ # @see #add_dejavu_sans_mono_font
19
+ # @see #add_repos this method is deprecated due to all packages being added
20
+ # to latest ubuntu 18.04+
21
+ def self.full
22
+ # this is here for compatibility purposes, no longer runs anything
23
+ add_repos
24
+ add_dejavu_sans_mono_font
25
+
26
+ ufw_setup
27
+ end
28
+
29
+ ##
30
+ # Sets up ufw for you to be able to have certain firewalls in place
31
+ # Must be run after installing ufw
32
+ # via sudo apt install ufw
33
+ def self.ufw_setup
34
+ Rake.sh('sudo ufw default deny incoming')
35
+ Rake.sh('sudo ufw default allow outgoing')
36
+ # allows ssh & mosh connections
37
+ Rake.sh('sudo ufw allow 60000:61000/tcp')
38
+
39
+ # Typical ssh port
40
+ Rake.sh('sudo ufw allow 22')
41
+
42
+ Rake.sh('yes | sudo ufw enable')
43
+ Rake.sh('yes | sudo systemctl restart sshd')
44
+ end
45
+
46
+ def self.add_dejavu_sans_mono_font
47
+ Rake.sh('mkdir -p ~/.local/share/fonts')
48
+ Rake.sh(%(cd ~/.local/share/fonts && curl -fLo "DejaVu Sans Mono for Powerline Nerd Font Complete.otf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DejaVuSansMono/Regular/complete/DejaVu%20Sans%20Mono%20Nerd%20Font%20Complete%20Mono.ttf))
49
+ end
50
+ ##
51
+ # Adds repos to the package manager to be tracked
52
+ # Adds the following repos:
53
+ # docker, yarn
54
+ # This method used to add neovim, asciinema, and mosh as well
55
+ # But they are all part of the base ubuntu 18.10 release
56
+ def self.add_repos
57
+ ## Now part of cosmic release for Ubuntu 18.10
58
+ # add_yarn_repo
59
+ # add_docker_repo
60
+ # add_neovim_repo
61
+ # add_mosh_repo
62
+ # add_asciinema_repo
63
+ end
64
+
65
+ # @deprecated Now part of the standard packaging of Ubuntu 18.04+
66
+ def self.add_docker_repo
67
+ # Instructions straight from https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository
68
+ # Docker repo
69
+ Rake.sh('curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -')
70
+ Rake.sh('sudo apt-key fingerprint 0EBFCD88')
71
+ Rake.sh(%{yes "\n" | sudo add-apt-repository -y \
72
+ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
73
+ $(lsb_release -cs) \
74
+ stable"})
75
+ end
76
+
77
+ # @deprecated Now part of the standard packaging of Ubuntu 18.04+
78
+ def self.add_yarn_repo
79
+ # yarn repo
80
+ Rake.sh(%( curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -))
81
+ Rake.sh(%(echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list))
82
+ Rake.sh('sudo apt update')
83
+ end
84
+
85
+
86
+ # @deprecated Now part of the standard packaging of Ubuntu 18.04+
87
+ def self.add_neovim_repo
88
+ # add neovim
89
+ Rake.sh('sudo add-apt-repository ppa:neovim-ppa/stable')
90
+ end
91
+
92
+ # @deprecated Now part of the standard packaging of Ubuntu 18.04+
93
+ def self.add_mosh_repo
94
+ # mosh repo
95
+ Rake.sh(%(yes "\n" | sudo add-apt-repository ppa:keithw/mosh))
96
+ end
97
+
98
+ # @deprecated Now part of the standard packaging of Ubuntu 18.04+
99
+ def self.add_asciinema_repo
100
+ # asciinema repo for recording the terminal
101
+ Rake.sh('sudo apt-add-repository -y ppa:zanchey/asciinema')
102
+ end
103
+
104
+ end
105
+ end
@@ -0,0 +1,3 @@
1
+ module VpsCli
2
+ VERSION = "0.1.4"
3
+ end
data/lib/vps_cli.rb ADDED
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'vps_cli/configuration'
4
+ require 'vps_cli/access'
5
+ require 'vps_cli/helpers/access_helper'
6
+ require 'vps_cli/cli'
7
+ require 'vps_cli/copy'
8
+ require 'vps_cli/helpers/file_helper'
9
+ require 'vps_cli/install'
10
+ require 'vps_cli/packages'
11
+ require 'vps_cli/pull'
12
+ require 'vps_cli/setup'
13
+ require 'vps_cli/version'
14
+ require 'vps_cli/helpers/github_http'
15
+
16
+ # Used for setting up a ubuntu environment
17
+ module VpsCli
18
+ # @!group Top Level Constants
19
+
20
+ # Project's Root Directory
21
+ ROOT = File.expand_path(File.expand_path('../', __dir__))
22
+
23
+ # Projects config_files directory
24
+ FILES_DIR = File.join(ROOT, 'config_files')
25
+
26
+ # Projects Dotfiles directory
27
+ DOTFILES_DIR = File.join(FILES_DIR, 'dotfiles')
28
+
29
+ # Miscellaneous files like sshd_config
30
+ MISC_FILES_DIR = File.join(FILES_DIR, 'misc_files')
31
+
32
+ # Directory of backup files
33
+ BACKUP_FILES_DIR = File.join(Dir.home, 'backup_files')
34
+
35
+ # @!endgroup
36
+
37
+ # all following methods will be module wide
38
+ class << self
39
+ # Used for loggings errors
40
+ # same as self.errors && self.errors=(errors)
41
+ # VpsCli.errors now accessible module wide
42
+ attr_accessor :errors
43
+
44
+ # Allows the user to be able to set global configurations
45
+ # @example
46
+ # VpsCli.configure do |config|
47
+ # config.local_dir = Dir.home
48
+ # config.backup_dir = File.join(Dir.home, 'backup_files')
49
+ # config.verbose = true
50
+ # end
51
+ # This will set the local dir to the value of $HOME
52
+ # The local dir is where files are copied to
53
+ attr_writer :configuration
54
+
55
+ # Base set of options, will set the defaults for the various options
56
+ # Take a hash due to people being able to set their own directories
57
+ # @param [Hash] Takes the hash to modify
58
+ # @return [Hash] Returns the options hash with the various options
59
+ # Possible options:
60
+ # :backup_dir
61
+ # :local_dir
62
+ # :dotfiles_dir
63
+ # :misc_files_dir
64
+ # :local_sshd_config
65
+ # :verbose
66
+ # :testing
67
+ # def create_options(opts = {})
68
+ # opts[:backup_dir] ||= BACKUP_FILES_DIR
69
+ # opts[:local_dir] ||= Dir.home
70
+ # opts[:dotfiles_dir] ||= DOTFILES_DIR
71
+ # opts[:misc_files_dir] ||= MISC_FILES_DIR
72
+ # opts[:local_sshd_config] ||= '/etc/ssh/sshd_config'
73
+
74
+ # opts[:verbose] = false if opts[:verbose].nil?
75
+ # opts[:interactive] = true if opts[:interactive].nil?
76
+
77
+ # opts
78
+ # end
79
+
80
+ def full_install(options = {})
81
+ VpsCli::Setup.full
82
+ VpsCli::Install.full
83
+ VpsCli::Access.provide_credentials(options)
84
+ VpsCli::Copy.all(options)
85
+ end
86
+ end
87
+
88
+ # Creates an empty array of errors to push to
89
+ @errors ||= []
90
+ end
@@ -0,0 +1,125 @@
1
+ -----BEGIN PGP PRIVATE KEY BLOCK-----
2
+ Version: GnuPG v1
3
+
4
+ lQHYBFYWi4IBBADQCJUOJC3UOFtH2CTL0z1q+MiqX0/nDWCT+/HcmopzAv4g6nC4
5
+ cYNohy2wImR4pLR2IoYdBBzV8iH/E030SSuY+K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alXO4p28g5t2ZgnSwG9FIzPWAqQ5lDZY9vNpi
122
+ 5/smx5NPBmZostu9BW6WdocUz73eBc7b7C7nnDzE98QLkHpWcKAB/TkTCH5TdFnI
123
+ ZLzz
124
+ =xTqz
125
+ -----END PGP PUBLIC KEY BLOCK-----
@@ -0,0 +1,19 @@
1
+ gitthub:
2
+ username: username
3
+ email: email@example.com
4
+ api_token: super_secret_token
5
+
6
+ heroku_unencrypted:
7
+ - The values of heroku can be obtained from $HOME/.netrc
8
+ - If you have logged in via the following commands before
9
+ - heroku login or heroku login --interactive
10
+
11
+ heroku:
12
+ api:
13
+ machine: machine api.heroku.com
14
+ login: login random_username
15
+ password: password blahblahblah
16
+ git:
17
+ machine: machine git.heroku.com
18
+ login: login random_username
19
+ password: password more_random_stuff
data/vps_cli.gemspec ADDED
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'vps_cli/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'vps_cli'
9
+ spec.version = VpsCli::VERSION
10
+ spec.authors = ['paramagicdev']
11
+ spec.email = ['konnor5456@gmail.com']
12
+
13
+ spec.summary = 'A gem created to facilitate setup of a new dev server'
14
+ spec.homepage = 'https://github.com/ParamagicDev/vps_cli'
15
+ spec.license = 'MIT'
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata['allowed_push_host'] = "https://rubygems.org/"
21
+
22
+ spec.metadata['homepage_uri'] = 'https://github.com/ParamagicDev/vps_cli'
23
+ spec.metadata['source_code_uri'] = 'https://github.com/ParamagicDev/vps_cli'
24
+ spec.metadata['changelog_uri'] = 'https://github.com/ParamagicDev/vps_cli'
25
+ else
26
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
27
+ 'public gem pushes.'
28
+ end
29
+
30
+ # Specify which files should be added to the gem when it is released.
31
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
32
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
33
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
34
+ end
35
+ spec.bindir = 'exe'
36
+ spec.executables = ['vps-cli']
37
+ spec.require_paths = ['lib']
38
+
39
+ spec.add_development_dependency 'bundler', '~> 2.0'
40
+ spec.add_development_dependency 'guard', '~> 2.15'
41
+ spec.add_development_dependency 'guard-minitest', '~> 2.4'
42
+ spec.add_development_dependency 'minitest', '~> 5.0'
43
+ spec.add_development_dependency 'rake', '~> 10.0'
44
+ spec.add_development_dependency 'yard', '~> 0.9'
45
+ spec.add_runtime_dependency 'thor', '~> 0.20'
46
+ end