katar 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6df886197ee378c1d6793ab16397c1ceaa76ea2b
4
- data.tar.gz: 39482861ca6a4865519f82c26cf0384110428e28
3
+ metadata.gz: 828f31435879a0d4ecc0074f69bd7d9d345e751e
4
+ data.tar.gz: 25cf117b9a960f2bc591493c0843d35f1726c265
5
5
  SHA512:
6
- metadata.gz: ea9c90fbcb41e1d4d4e4497a1ee012981a9cecfbf9ad2de3458edeb2a02632020324c3e30b0e6a7b9c6430c958852f91306fab685786149757a4e2b29b765104
7
- data.tar.gz: aff27ee622cf994e27999bfdb26c75da08e90b766be4154fd2d2488e51041d1d20192743584bd6b84e4ca07bcd513ca8471bdbcb0df5542ec1462d284fec9d71
6
+ metadata.gz: b079973aa3279bd79d8da9976be5fd677fcfd817ac6f72fc85ab820bcb93b4b296ac14f1dcc36d9fe23b80e322508f60f0fa0da64267bf7a83f26a30b8f08097
7
+ data.tar.gz: 8bb5176ff7fea11a907db25f3f67ccce42b4618962b9e983dbaa1b8fd748a3b4025f414a246d99096a1d580317df902a2836f8d884b173697be2a859cb913e2b
data/.gitignore CHANGED
@@ -1,18 +1,19 @@
1
- .vagrant
2
- *.sublime-project
3
- *.sublime-workspace
4
- *.gem
5
- /.bundle/
6
- /.yardoc
7
- /Gemfile.lock
8
- /_yardoc/
9
- /coverage/
10
- /doc/
11
- /pkg/
12
- /spec/reports/
13
- /tmp/
14
- *.bundle
15
- *.so
16
- *.o
17
- *.a
18
- mkmf.log
1
+ .vagrant
2
+ *.sublime-project
3
+ *.sublime-workspace
4
+ *.gem
5
+ /.bundle/
6
+ /.yardoc
7
+ /Gemfile.lock
8
+ /_yardoc/
9
+ /coverage/
10
+ /doc/
11
+ /pkg/
12
+ /spec/reports/
13
+ /tmp/
14
+ *.bundle
15
+ *.so
16
+ *.o
17
+ *.a
18
+ mkmf.log
19
+ .idea/*
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in liqueur.gemspec
4
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in liqueur.gemspec
4
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2016 AcMitch
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2016 AcMitch
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,148 +1,166 @@
1
- Katar provides a simple, elegant way to manage and provision a Vagrant box on your local machine! Vagrant boxes are completely disposable. If something goes wrong, you can destroy and re-create the box in seconds!
2
-
3
- **Note: Katar is inspired by PHP's [Laravel Homestead](https://laravel.com/docs/5.2/homestead) but with broader scope and without PHP dependencies. If developing web applications or in PHP [Laravel Homestead](https://laravel.com/docs/5.2/homestead) is highly recommended.**
4
-
5
- Katar runs on any Windows, Mac, or Linux system, and by default uses a Vagrant box with almost everything you need to develop most applications.
6
-
7
- ### Installing VirtualBox & Vagrant
8
-
9
- Before launching your Katar environment, you must install VirtualBox and Vagrant. Both of these software packages provide easy-to-use visual installers for all popular operating systems.
10
-
11
- **Note: If you are using Windows, you may need to enable hardware virtualization (VT-x). It can usually be enabled via your BIOS.**
12
-
13
- ### Installing Katar
14
-
15
- Katar is a Ruby Gem, therefore, Ruby must be installed on your local machine. Once Ruby is installed simply run the following command to install Katar:
16
-
17
- ```
18
- gem install katar
19
- ```
20
-
21
- Once you have installed the Katar Gem, run the `init command` to create the Katar.yaml configuration file:
22
-
23
- ```
24
- katar init
25
- ```
26
-
27
- The Katar.yaml file will be placed in the ~/.katar directory. If you're using a Mac or Linux system, you may edit Katar.yaml file by running the `katar edit` command in your terminal:
28
-
29
- ```
30
- katar edit
31
- ```
32
-
33
- If you would like to do some extra provisioning you may add any commands you wish to the `after.sh` file within the ~/.katar directory and they will be run after the Katar machine is provisioned.
34
-
35
- ### Setting Your Box
36
-
37
- The `box` property of the Katar.yaml file is the Vagrant box that will be utilized by your Katar environment. If no box is provided then `ubuntu\wily64` will be created.
38
-
39
- **Note: Mysql and Postgres scripts run if a database is provided within the Katar.yaml file. Those database engines must be installed on the specified box for Katar to initialize properly. Simply comment out the database section within the Katar.yaml and configure the database manually if needing to run without those engines.**
40
-
41
- By default the `box` property is set to `acmitch/katar-box`. Included with that box is the following software:
42
-
43
- ##### Included Software
44
- - Ubuntu 15.10
45
- - Docker 1.10
46
- - Git
47
- - Subversion
48
- - Java 8
49
- - Python 2.7.10
50
- - Ruby 2.2.3 (RVM)
51
- - R
52
- - MySQL
53
- - Sqlite3
54
- - Postgres
55
- - NodeJs(With PM2, Browserify, Bower, Grunt, and Gulp)
56
- - Redis
57
- - Memcached
58
-
59
- #### Included Applications
60
- - Xfce4 Desktop
61
- - Sublime Text 3
62
- - Terminator
63
- - Emacs
64
- - Vim
65
-
66
- **Note: If wishing to contribute clone `acmitch/katar-box` on GitHub.**
67
-
68
- ### Configuring Shared Folders
69
-
70
- The folders property of the Katar.yaml file lists all of the folders you wish to share with your Katar environment. As files within these folders are changed, they will be kept in sync between your local machine and the Katar environment. You may configure as many shared folders as necessary:
71
-
72
- ```
73
- folders:
74
- - map: ~/Workspace
75
- to: /home/vagrant/Workspace
76
- ```
77
-
78
- ### Set Your SSH Key
79
-
80
- Next, you should edit the Katar.yaml file. In this file, you can configure the path to your public SSH key, as well as the folders you wish to be shared between your main machine and the Katar virtual machine.
81
-
82
- **Don't have an SSH key? On Mac and Linux, you can generally create an SSH key pair using the following command:**
83
-
84
- ```
85
- ssh-keygen -t rsa -C "you@katar"
86
- ```
87
-
88
- On Windows, you may install Git and use the Git Bash shell included with Git to issue the command above. Alternatively, you may use PuTTY and PuTTYgen.
89
-
90
- Once you have created a SSH key, specify the key's path in the authorize property of your Katar.yaml file.
91
-
92
- ### Launch The Vagrant Box
93
-
94
- Once you have edited the Katar.yaml to your liking, run the `katar up` command in your terminal.
95
-
96
- Vagrant will boot the virtual machine, and configure your shared folders! To destroy the machine, you may use the `katar destroy` command. For a complete list of available Katar commands, run `katar help`.
97
-
98
- ```
99
- Commands:
100
- katar destroy # Destroy the Katar machine
101
- katar edit # Edit the Katar.yaml file
102
- katar halt # Halt the Katar machine
103
- katar help [COMMAND] # D``escribe available commands or one specific command
104
- katar init # Create a stub Katar.yaml file
105
- katar provision # Re-provisions the Katar machine
106
- katar provision # Update the Katar machine image
107
- katar resume # Resume the suspended Katar machine
108
- katar ssh # Login to the Katar machine via SSH
109
- katar status # Get the status of the Katar machine
110
- katar suspend # Suspend the Katar machine
111
- katar up # Start the Katar machine
112
- katar version # Show Katar version number
113
- ```
114
-
115
- ### Connecting To Your Databases
116
-
117
- A `katar` database is configured for both MySQL and Postgres out of the box. You can add as many databases as you'd like by typing the `katar edit` command and editing the `databases` section of the Katar.yaml file. The username and password for all databases is `root` / `secret`.
118
-
119
- ### Ports
120
-
121
- By default, the following ports are forwarded to your Katar environment:
122
-
123
- ```
124
- SSH: 2222 → Forwards To 22
125
- HTTP: 8000 → Forwards To 80
126
- HTTPS: 44300 → Forwards To 443
127
- MySQL: 33060 → Forwards To 3306
128
- Postgres: 54320 → Forwards To 5432
129
- Forwarding Additional Ports
130
- ```
131
-
132
- If you wish, you may forward additional ports to the Vagrant box, as well as specify their protocol:
133
-
134
- ```
135
- ports:
136
- - send: 93000
137
- to: 9300
138
- - send: 7777
139
- to: 777
140
- protocol: udp
141
- ```
142
- ### Desktop Mode
143
-
144
- By default, VirtualBox machines are started in headless mode, meaning there is no UI for the machines visible on the host machine. To utilize the UI set the `desktop` property to true in the Katar.yaml file. During the boot process VirtualBox will open prompting login. When the boot processes finishes, simply login using the credentials `vagrant`/`vagrant`. Once logged in start the GUI by typing into the prompt:
145
-
146
- ```
147
- xfce4-desktop
148
- ```
1
+ Katar provides a simple, elegant way to manage and provision a Vagrant box on your local machine! Vagrant boxes are completely disposable. If something goes wrong, you can destroy and re-create the box in seconds!
2
+
3
+ **Note: Katar is inspired by PHP's [Laravel Homestead](https://laravel.com/docs/5.2/homestead) but with broader scope, Docker containers and without PHP dependencies.**
4
+
5
+ Katar runs on any Windows, Mac, or Linux system, and by default uses a Vagrant box with almost everything you need to develop most applications.
6
+
7
+ ### Installing VirtualBox & Vagrant
8
+
9
+ Before launching your Katar environment, you must install VirtualBox and Vagrant. Both of these software packages provide easy-to-use visual installers for all popular operating systems.
10
+
11
+ **Note: If you are using Windows, you may need to enable hardware virtualization (VT-x). It can usually be enabled via your BIOS.**
12
+
13
+ ### Installing Katar
14
+
15
+ Katar is a Ruby Gem, therefore, Ruby must be installed on your local machine. Once Ruby is installed simply run the following command to install Katar:
16
+
17
+ ```
18
+ gem install katar
19
+ ```
20
+
21
+ Once you have installed the Katar Gem, run the `init command` to create the Katar.yaml configuration file:
22
+
23
+ ```
24
+ katar init
25
+ ```
26
+
27
+ The Katar.yaml file will be placed in the ~/.katar directory. If you're using a Mac or Linux system, you may edit Katar.yaml file by running the `katar edit` command in your terminal:
28
+
29
+ ```
30
+ katar edit
31
+ ```
32
+
33
+ If you would like to do some extra provisioning you may add any commands you wish to the `after.sh` file within the ~/.katar directory and they will be run after the Katar machine is provisioned.
34
+
35
+ ### Setting Your Box
36
+
37
+ The `box` property of the Katar.yaml file is the Vagrant box that will be utilized by your Katar environment.
38
+
39
+ By default the `box` property is set to `acmitch/katar-box`. Included with that box is the following:
40
+
41
+ #### Included Software
42
+ - Ubuntu 15.10
43
+ - Git
44
+ - Docker
45
+ - Java 8
46
+ - Sqlite3
47
+ - Memcached
48
+ - Subversion
49
+ - Python 2.7.10
50
+ - Ruby 2.2.3 (RVM)
51
+ - NodeJs(With PM2, Browserify, Bower, Babel, Webpack, and Gulp)
52
+ - R
53
+
54
+ #### Docker Containers
55
+ - MySQL
56
+ - Postgres
57
+ - MongoDB
58
+ - Redis
59
+ - Elasticsearch
60
+
61
+ #### Included Applications
62
+ - Xfce4 Desktop
63
+ - Sublime Text 3
64
+ - Terminator
65
+ - Emacs
66
+
67
+ **Note: If wishing to contribute clone `acmitch/katar-box` on GitHub.**
68
+
69
+ ### Configuring Shared Folders
70
+
71
+ The folders property of the Katar.yaml file lists all of the folders you wish to share with your Katar environment. As files within these folders are changed, they will be kept in sync between your local machine and the Katar environment. You may configure as many shared folders as necessary:
72
+
73
+ ```
74
+ folders:
75
+ - map: ~/Workspace
76
+ to: /home/vagrant/Workspace
77
+ ```
78
+
79
+ ### Set Your SSH Key
80
+
81
+ Next, you should edit the Katar.yaml file. In this file, you can configure the path to your public SSH key, as well as the folders you wish to be shared between your main machine and the Katar virtual machine.
82
+
83
+ **Don't have an SSH key? On Mac and Linux, you can generally create an SSH key pair using the following command:**
84
+
85
+ ```
86
+ ssh-keygen -t rsa -C "you@katar"
87
+ ```
88
+
89
+ On Windows, you may install Git and use the Git Bash shell included with Git to issue the command above. Alternatively, you may use PuTTY and PuTTYgen.
90
+
91
+ Once you have created a SSH key, specify the key's path in the authorize property of your Katar.yaml file.
92
+
93
+ ### Launch The Vagrant Box
94
+
95
+ Once you have edited the Katar.yaml to your liking, run the `katar up` command in your terminal.
96
+
97
+ Vagrant will boot the virtual machine, and configure your shared folders! To destroy the machine, you may use the `katar destroy` command. For a complete list of available Katar commands, run `katar help`.
98
+
99
+ ```
100
+ Commands:
101
+ katar destroy # Destroy the Katar machine
102
+ katar edit # Edit the Katar.yaml file
103
+ katar halt # Halt the Katar machine
104
+ katar help [COMMAND] # D``escribe available commands or one specific command
105
+ katar init # Create a stub Katar.yaml file
106
+ katar provision # Re-provisions the Katar machine
107
+ katar provision # Update the Katar machine image
108
+ katar resume # Resume the suspended Katar machine
109
+ katar ssh # Login to the Katar machine via SSH
110
+ katar status # Get the status of the Katar machine
111
+ katar suspend # Suspend the Katar machine
112
+ katar up # Start the Katar machine
113
+ katar version # Show Katar version number
114
+ ```
115
+
116
+ ### Ports
117
+
118
+ By default, the following ports are forwarded to your Katar environment:
119
+
120
+ ```
121
+ SSH: 2222 Forwards To 22
122
+ HTTP: 8000 → Forwards To 80
123
+ HTTPS: 44300 → Forwards To 443
124
+ MySQL: 33060 → Forwards To 3306
125
+ Postgres: 54320 → Forwards To 5432
126
+ Forwarding Additional Ports
127
+ ```
128
+
129
+ If you wish, you may forward additional ports to the Vagrant box, as well as specify their protocol:
130
+
131
+ ```
132
+ ports:
133
+ - send: 93000
134
+ to: 9300
135
+ - send: 7777
136
+ to: 777
137
+ protocol: udp
138
+ ```
139
+ ### Desktop Mode
140
+
141
+ By default, VirtualBox machines are started in headless mode, meaning there is no UI for the machines visible on the host machine. To utilize the UI set the `desktop` property to true in the Katar.yaml file. During the boot process VirtualBox will open prompting login. When the boot processes finishes, simply login using the credentials `vagrant`/`vagrant`. Once logged in start the GUI by typing into the prompt:
142
+
143
+ ```bash
144
+ # Start the VM desktop
145
+ xfce4-desktop
146
+
147
+ # Turn on bidirectional clipboard
148
+ clipboard-on
149
+ ```
150
+
151
+ ### Docker Containers
152
+ Docker containers are used to support multiple services within Katar by default.
153
+
154
+ ```bash
155
+ # Display all containers
156
+ docker ps -a
157
+
158
+ # Start a Docker MongoDB container
159
+ docker start mongo-db
160
+ ```
161
+
162
+
163
+
164
+
165
+
166
+
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
- require "bundler/gem_tasks"
2
-
1
+ require "bundler/gem_tasks"
2
+
data/Vagrantfile CHANGED
@@ -1,40 +1,40 @@
1
- require 'json'
2
- require 'yaml'
3
-
4
- VAGRANTFILE_API_VERSION = "2"
5
- confDir = $confDir ||= File.expand_path("~/.katar")
6
-
7
- katarYamlPath = confDir + "/Katar.yaml"
8
- katarJsonPath = confDir + "/Katar.json"
9
- afterScriptPath = confDir + "/after.sh"
10
- sshconfigPath = confDir + "/sshconfig"
11
- aliasesPath = confDir + "/aliases"
12
-
13
- require File.expand_path(File.dirname(__FILE__) + '/lib/katar/vagrant.rb')
14
-
15
- Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
16
-
17
- if File.exists? aliasesPath then
18
- config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
19
- end
20
-
21
- if File.exists? sshconfigPath then
22
- config.vm.provision "file", source: sshconfigPath, destination: "~/.ssh/config"
23
- end
24
-
25
- # Read configuration
26
- if File.exists? katarYamlPath then
27
- settings = YAML::load(File.read(katarYamlPath))
28
- elsif File.exists? katarJsonPath then
29
- settings = JSON.parse(File.read(katarJsonPath))
30
- end
31
-
32
- # Setup/Start up VM
33
- Katar.configure(config, settings)
34
-
35
- # Provision using custom shell script
36
- if File.exists? afterScriptPath then
37
- config.vm.provision "shell", path: afterScriptPath
38
- end
39
-
1
+ require 'json'
2
+ require 'yaml'
3
+
4
+ VAGRANTFILE_API_VERSION = "2"
5
+ confDir = $confDir ||= File.expand_path("~/.katar")
6
+
7
+ katarYamlPath = confDir + "/Katar.yaml"
8
+ katarJsonPath = confDir + "/Katar.json"
9
+ afterScriptPath = confDir + "/after.sh"
10
+ sshconfigPath = confDir + "/sshconfig"
11
+ aliasesPath = confDir + "/aliases"
12
+
13
+ require File.expand_path(File.dirname(__FILE__) + '/lib/katar/vagrant.rb')
14
+
15
+ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
16
+
17
+ if File.exists? aliasesPath then
18
+ config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
19
+ end
20
+
21
+ if File.exists? sshconfigPath then
22
+ config.vm.provision "file", source: sshconfigPath, destination: "~/.ssh/config"
23
+ end
24
+
25
+ # Read configuration
26
+ if File.exists? katarYamlPath then
27
+ settings = YAML::load(File.read(katarYamlPath))
28
+ elsif File.exists? katarJsonPath then
29
+ settings = JSON.parse(File.read(katarJsonPath))
30
+ end
31
+
32
+ # Setup/Start up VM
33
+ Katar.configure(config, settings)
34
+
35
+ # Provision using custom shell script
36
+ if File.exists? afterScriptPath then
37
+ config.vm.provision "shell", path: afterScriptPath
38
+ end
39
+
40
40
  end