gemstash 2.8.2 → 2.9.0
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.
- checksums.yaml +4 -4
- data/lib/gemstash/authorization.rb +0 -2
- data/lib/gemstash/cache.rb +5 -4
- data/lib/gemstash/cli/base.rb +9 -2
- data/lib/gemstash/cli/setup.rb +1 -1
- data/lib/gemstash/cli/start.rb +4 -0
- data/lib/gemstash/configuration.rb +71 -1
- data/lib/gemstash/db/upstream.rb +30 -2
- data/lib/gemstash/dependencies.rb +28 -5
- data/lib/gemstash/env.rb +4 -2
- data/lib/gemstash/gem_fetcher.rb +1 -2
- data/lib/gemstash/gem_pusher.rb +24 -20
- data/lib/gemstash/gem_source/private_source.rb +22 -6
- data/lib/gemstash/gem_source/upstream_source.rb +129 -34
- data/lib/gemstash/http_client.rb +167 -8
- data/lib/gemstash/logging.rb +3 -1
- data/lib/gemstash/man/gemstash-authorize.1 +29 -48
- data/lib/gemstash/man/gemstash-authorize.1.txt +14 -14
- data/lib/gemstash/man/gemstash-configuration.5 +231 -154
- data/lib/gemstash/man/gemstash-configuration.5.txt +208 -93
- data/lib/gemstash/man/gemstash-customize.7 +150 -168
- data/lib/gemstash/man/gemstash-customize.7.txt +80 -86
- data/lib/gemstash/man/gemstash-debugging.7 +20 -33
- data/lib/gemstash/man/gemstash-debugging.7.txt +5 -7
- data/lib/gemstash/man/gemstash-deploy.7 +31 -53
- data/lib/gemstash/man/gemstash-deploy.7.txt +17 -18
- data/lib/gemstash/man/gemstash-mirror.7 +24 -37
- data/lib/gemstash/man/gemstash-mirror.7.txt +14 -9
- data/lib/gemstash/man/gemstash-multiple-sources.7 +105 -110
- data/lib/gemstash/man/gemstash-multiple-sources.7.txt +62 -41
- data/lib/gemstash/man/gemstash-private-gems.7 +87 -136
- data/lib/gemstash/man/gemstash-private-gems.7.txt +30 -30
- data/lib/gemstash/man/gemstash-readme.7 +105 -127
- data/lib/gemstash/man/gemstash-readme.7.txt +43 -49
- data/lib/gemstash/man/gemstash-setup.1 +22 -42
- data/lib/gemstash/man/gemstash-setup.1.txt +12 -12
- data/lib/gemstash/man/gemstash-start.1 +9 -27
- data/lib/gemstash/man/gemstash-start.1.txt +5 -5
- data/lib/gemstash/man/gemstash-status.1 +9 -27
- data/lib/gemstash/man/gemstash-status.1.txt +5 -5
- data/lib/gemstash/man/gemstash-stop.1 +9 -27
- data/lib/gemstash/man/gemstash-stop.1.txt +5 -5
- data/lib/gemstash/man/gemstash-version.1 +8 -28
- data/lib/gemstash/man/gemstash-version.1.txt +2 -2
- data/lib/gemstash/rack_env_rewriter.rb +3 -0
- data/lib/gemstash/upstream.rb +83 -6
- data/lib/gemstash/version.rb +1 -1
- data/lib/gemstash/web.rb +12 -0
- metadata +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
4mgemstash-customize24m(7)
|
|
1
|
+
4mgemstash-customize24m(7) Miscellaneous Information Manual 4mgemstash-customize24m(7)
|
|
2
2
|
|
|
3
3
|
1mCustomizing the Server0m
|
|
4
4
|
Although Gemstash is designed for as minimal setup as possible, there
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
1mSetup0m
|
|
11
11
|
Several customizable options are available via an interactive Gemstash
|
|
12
|
-
command. Run
|
|
12
|
+
command. Run gemstash setup and answer the questions it provides (a
|
|
13
13
|
blank answer will use the default value):
|
|
14
14
|
|
|
15
15
|
$ gemstash setup
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
Once you've answered the questions, some checks will be made to ensure
|
|
27
27
|
the configuration will work. For example, the database didn't exist in
|
|
28
28
|
the previous example, so the command failed and the configuration
|
|
29
|
-
wasn't saved. If the command passes, you may provide the
|
|
29
|
+
wasn't saved. If the command passes, you may provide the --redo option
|
|
30
30
|
to force configuration to be redone:
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
$ gemstash setup --redo
|
|
33
33
|
Where should files go? [~/.gemstash]
|
|
34
34
|
Cache with what? [MEMORY, memcached] 1mmemcached0m
|
|
35
35
|
What is the comma separated Memcached servers? [local-
|
|
@@ -39,129 +39,123 @@
|
|
|
39
39
|
Checking that the database is available
|
|
40
40
|
You are all setup!
|
|
41
41
|
Once all checks have passed, Gemstash will store your answers in the
|
|
42
|
-
configuration file located at
|
|
42
|
+
configuration file located at ~/.gemstash/config.yml.
|
|
43
43
|
|
|
44
44
|
1mFiles0m
|
|
45
|
-
Storage in Gemstash defaults to
|
|
46
|
-
You can change this in your config file via the
|
|
45
|
+
Storage in Gemstash defaults to ~/.gemstash unless otherwise specified.
|
|
46
|
+
You can change this in your config file via the :base_path key:
|
|
47
47
|
|
|
48
|
-
# ~/.gemstash/config.
|
|
48
|
+
4m#24m 4m~/.gemstash/config.yml0m
|
|
49
49
|
---
|
|
50
|
-
:
|
|
50
|
+
:base_path1m: 22m"/var/gemstash"
|
|
51
51
|
|
|
52
|
-
When customizing the
|
|
53
|
-
Gemstash will fail to run. Thus, if you want to use
|
|
54
|
-
in the previous example, make sure to
|
|
52
|
+
When customizing the base_path, the directory must exist, otherwise
|
|
53
|
+
Gemstash will fail to run. Thus, if you want to use /var/gemstash like
|
|
54
|
+
in the previous example, make sure to mkdir /var/gemstash and grant ac-
|
|
55
55
|
cess to the directory for the user you run Gemstash with.
|
|
56
56
|
|
|
57
57
|
1mDatabase0m
|
|
58
|
-
The
|
|
59
|
-
using. The default
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
You
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
# ~/.gemstash/config.yml
|
|
58
|
+
The :db_adapter configuration key specifies what database you will be
|
|
59
|
+
using. The default :db_adapter is 8;;https://www.sqlite.org/sqlite38;;, which will use a database
|
|
60
|
+
file located within your :base_path. The database file will always be
|
|
61
|
+
named gemstash.db.
|
|
62
|
+
|
|
63
|
+
You may also use 8;;http://www.postgresql.org/postgres8;;, 8;;http://www.mysql.com/mysql8;;, or 8;;http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-mysql2mysql28;; for your :db_adapter. When
|
|
64
|
+
using any of these options, you need to specify the :db_url to point to
|
|
65
|
+
an existing database. Here is an example configuration to use the
|
|
66
|
+
postgres adapter:
|
|
67
|
+
|
|
68
|
+
4m#24m 4m~/.gemstash/config.yml0m
|
|
71
69
|
---
|
|
72
|
-
:
|
|
73
|
-
:
|
|
74
|
-
:
|
|
75
|
-
:
|
|
76
|
-
:
|
|
77
|
-
:
|
|
78
|
-
|
|
79
|
-
Regardless
|
|
80
|
-
migrate
|
|
81
|
-
You
|
|
82
|
-
rest, except for
|
|
70
|
+
:db_adapter1m: 22mpostgres
|
|
71
|
+
:db_url1m: 22mpostgres:///gemstash
|
|
72
|
+
:db_connection_options1m: 4m22m#24m 4mSequel.connect24m 4moptions0m
|
|
73
|
+
:connect_timeout1m: 22m10
|
|
74
|
+
:read_timeout1m: 22m5
|
|
75
|
+
:timeout1m: 22m30
|
|
76
|
+
|
|
77
|
+
Regardless of the adapter you choose, the database will automatically
|
|
78
|
+
migrate to your version of Gemstash whenever the database is needed.
|
|
79
|
+
You only need to ensure the database exists and Gemstash will do the
|
|
80
|
+
rest, except for sqlite3 (for which Gemstash will also create the data-
|
|
83
81
|
base for you).
|
|
84
82
|
|
|
85
83
|
1mCache0m
|
|
86
|
-
Certain
|
|
84
|
+
Certain things (like dependencies) are cached in memory. This avoids
|
|
87
85
|
web calls to the gem source, and database calls for private gems.
|
|
88
86
|
|
|
89
|
-
# ~/.gemstash/config.
|
|
87
|
+
4m#24m 4m~/.gemstash/config.yml0m
|
|
90
88
|
---
|
|
91
|
-
:
|
|
92
|
-
:
|
|
89
|
+
:cache_type1m: 22mmemory
|
|
90
|
+
:cache_max_size1m: 22m2000
|
|
93
91
|
|
|
94
|
-
This configuration uses the default
|
|
95
|
-
|
|
92
|
+
This configuration uses the default memory cache, and has increased the
|
|
93
|
+
cache_max_size setting from its default of 500 items.
|
|
96
94
|
|
|
97
|
-
The
|
|
98
|
-
(
|
|
95
|
+
The memory cache can optionally be swapped out with a 8;;http://memcached.org/Memcached8;; server
|
|
96
|
+
(or cluster of servers).
|
|
99
97
|
|
|
100
|
-
To use Memcached, use the
|
|
98
|
+
To use Memcached, use the memcached :cache_type configuration.
|
|
101
99
|
|
|
102
|
-
Provide the servers as a comma-separated list to the
|
|
100
|
+
Provide the servers as a comma-separated list to the :memcached_servers
|
|
103
101
|
configuration key:
|
|
104
102
|
|
|
105
|
-
# ~/.gemstash/config.
|
|
103
|
+
4m#24m 4m~/.gemstash/config.yml0m
|
|
106
104
|
---
|
|
107
|
-
:
|
|
108
|
-
:
|
|
109
|
-
:
|
|
105
|
+
:cache_type1m: 22mmemcached
|
|
106
|
+
:memcached_servers1m: 22mmemcached1.local:11211,memcached2.local:11211
|
|
107
|
+
:cache_expiration1m: 22m1800
|
|
110
108
|
|
|
111
|
-
All
|
|
109
|
+
All caching expires in cache_expiration number of seconds. Default is
|
|
112
110
|
1800 seconds (30 minutes). This option applies to all caching.
|
|
113
111
|
|
|
114
112
|
1mServer0m
|
|
115
|
-
Gemstash uses
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
(https://github.com/rubygems/gemstash/blob/master/lib/gemstash/puma.rb)
|
|
119
|
-
and the rackup file (https://github.com/rubygems/gemstash/blob/mas-
|
|
120
|
-
ter/lib/gemstash/config.ru) for inspiration.
|
|
113
|
+
Gemstash uses 8;;http://puma.io/Puma8;; and 8;;http://rack.github.io/Rack8;; as the server. Alternate server configura-
|
|
114
|
+
tions are not currently supported, but you can take a look at the 8;;https://github.com/rubygems/gemstash/blob/master/lib/gemstash/puma.rbPuma
|
|
115
|
+
configuration8;; and the 8;;https://github.com/rubygems/gemstash/blob/master/lib/gemstash/config.rurackup file8;; for inspiration.
|
|
121
116
|
|
|
122
117
|
While the server is not customizable, the way Gemstash binds the port
|
|
123
|
-
can be changed. To change the binding, update the
|
|
118
|
+
can be changed. To change the binding, update the :bind configuration
|
|
124
119
|
key:
|
|
125
120
|
|
|
126
|
-
# ~/.gemstash/config.
|
|
121
|
+
4m#24m 4m~/.gemstash/config.yml0m
|
|
127
122
|
---
|
|
128
|
-
:
|
|
123
|
+
:bind1m: 22mtcp://0.0.0.0:4242
|
|
129
124
|
|
|
130
|
-
This
|
|
131
|
-
|
|
132
|
-
anything valid for that flag.
|
|
125
|
+
This maps directly to the 8;;https://github.com/puma/puma#binding-tcp--socketsPuma bind flag8;;, and will support anything
|
|
126
|
+
valid for that flag.
|
|
133
127
|
|
|
134
|
-
The
|
|
135
|
-
|
|
128
|
+
The number of threads Puma uses is also customizable via the
|
|
129
|
+
:puma_threads configuration key. The default is 16.
|
|
136
130
|
|
|
137
131
|
1mProtected Fetch0m
|
|
138
|
-
Gemstash
|
|
139
|
-
Authenticated
|
|
132
|
+
Gemstash by default allows unauthenticated access for private gems.
|
|
133
|
+
Authenticated access is available via the :protected_fetch configura-
|
|
140
134
|
tion key.
|
|
141
135
|
|
|
142
|
-
# ~/.gemstash/config.
|
|
136
|
+
4m#24m 4m~/.gemstash/config.yml0m
|
|
143
137
|
---
|
|
144
|
-
:
|
|
138
|
+
:protected_fetch1m: 22mtrue
|
|
145
139
|
|
|
146
140
|
More details on protected_fetch are here.
|
|
147
141
|
|
|
148
142
|
1mFetch Timeout0m
|
|
149
|
-
The
|
|
143
|
+
The default fetch timeout is 20 seconds. Use the :fetch_timeout con-
|
|
150
144
|
figuration key to change it.
|
|
151
145
|
|
|
152
146
|
---
|
|
153
|
-
:
|
|
147
|
+
:fetch_timeout1m: 22m20
|
|
154
148
|
|
|
155
149
|
1mOpen Timeout0m
|
|
156
|
-
The
|
|
157
|
-
|
|
150
|
+
The default connection open timeout is 2 seconds. Use the :open_time-
|
|
151
|
+
out configuration key to change it.
|
|
158
152
|
|
|
159
153
|
---
|
|
160
|
-
:
|
|
154
|
+
:open_timeout1m: 22m2
|
|
161
155
|
|
|
162
156
|
1mConfig File Location0m
|
|
163
|
-
By
|
|
164
|
-
|
|
157
|
+
By default, configuration for Gemstash will be at ~/.gemstash/con-
|
|
158
|
+
fig.yml. This can be changed by providing the --config-file option to
|
|
165
159
|
the various Gemstash commands:
|
|
166
160
|
|
|
167
161
|
$ gemstash setup --config-file ./gemstash-config.yml
|
|
@@ -170,20 +164,20 @@
|
|
|
170
164
|
$ gemstash stop --config-file ./gemstash-config.yml
|
|
171
165
|
$ gemstash status --config-file ./gemstash-config.yml
|
|
172
166
|
|
|
173
|
-
When
|
|
174
|
-
be
|
|
175
|
-
existing
|
|
176
|
-
|
|
177
|
-
|
|
167
|
+
When providing --config-file to gemstash setup, the provided file will
|
|
168
|
+
be output to with the provided configuration. 1mThis will overwrite 22many
|
|
169
|
+
existing configuration. If the file doesn't exist when providing
|
|
170
|
+
--config-file to gemstash start, gemstash stop, gemstash status, and
|
|
171
|
+
gemstash authorize, the default configuration will be used.
|
|
178
172
|
|
|
179
173
|
1mERB parsed config0m
|
|
180
|
-
You
|
|
181
|
-
this will be used instead of
|
|
174
|
+
You may also create a ~/.gemstash/config.yml.erb file. If present,
|
|
175
|
+
this will be used instead of ~/.gemstash/config.yml. For example, with
|
|
182
176
|
this you can use environment variables in the config:
|
|
183
177
|
|
|
184
|
-
# ~/.gemstash/config.yml.
|
|
178
|
+
4m#24m 4m~/.gemstash/config.yml.erb0m
|
|
185
179
|
---
|
|
186
|
-
:
|
|
187
|
-
:
|
|
180
|
+
:db_adapter1m: 22mpostgres
|
|
181
|
+
:db_url1m: 22m<%= ENV1m[22m"DATABASE_URL"1m] 22m%>
|
|
188
182
|
|
|
189
183
|
October 28, 2015 4mgemstash-customize24m(7)
|
|
@@ -1,47 +1,34 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
|
|
4
|
-
.\" that render this, and otherwise B font.
|
|
5
|
-
.ie "\f[CB]x\f[]"x" \{\
|
|
6
|
-
. ftr V B
|
|
7
|
-
. ftr VI BI
|
|
8
|
-
. ftr VB B
|
|
9
|
-
. ftr VBI BI
|
|
10
|
-
.\}
|
|
11
|
-
.el \{\
|
|
12
|
-
. ftr V CR
|
|
13
|
-
. ftr VI CI
|
|
14
|
-
. ftr VB CB
|
|
15
|
-
. ftr VBI CBI
|
|
16
|
-
.\}
|
|
17
|
-
.TH "gemstash-debugging" "7" "October 28, 2015" "" ""
|
|
18
|
-
.hy
|
|
3
|
+
.TH "gemstash\-debugging" "7" "October 28, 2015" ""
|
|
19
4
|
.SH Debugging Gemstash
|
|
20
|
-
|
|
21
|
-
If you are finding Gemstash isn\[cq]t behaving as you would expect, you
|
|
5
|
+
If you are finding Gemstash isn\(cqt behaving as you would expect, you
|
|
22
6
|
might want to start by looking at the server log.
|
|
23
|
-
You can find the log at \f[
|
|
24
|
-
|
|
7
|
+
You can find the log at \f[CR]server.log\f[R] within your base
|
|
8
|
+
directory.
|
|
9
|
+
By default, this will be at \f[CR]\(ti/.gemstash/server.log\f[R].
|
|
25
10
|
.PP
|
|
26
11
|
You might find it easier to view the log directly in your terminal.
|
|
27
12
|
Gemstash outputs its log directly to standard out:
|
|
28
13
|
.IP
|
|
29
|
-
.
|
|
30
|
-
\f[C]
|
|
14
|
+
.EX
|
|
31
15
|
$ gemstash start
|
|
32
|
-
|
|
33
|
-
.fi
|
|
16
|
+
.EE
|
|
34
17
|
.PP
|
|
35
18
|
You can also check the status of the server:
|
|
36
19
|
.IP
|
|
37
|
-
.
|
|
38
|
-
\f[C]
|
|
20
|
+
.EX
|
|
39
21
|
$ gemstash status
|
|
40
|
-
|
|
41
|
-
.fi
|
|
22
|
+
.EE
|
|
42
23
|
.PP
|
|
43
|
-
The server status is checked by passing through to
|
|
44
|
-
|
|
24
|
+
The server status is checked by passing through to \c
|
|
25
|
+
.UR https://github.com/puma/puma#controlstatus-server
|
|
26
|
+
pumactl
|
|
27
|
+
.UE \c
|
|
28
|
+
\&.
|
|
45
29
|
.PP
|
|
46
|
-
If you find a bug, please don\
|
|
47
|
-
|
|
30
|
+
If you find a bug, please don\(cqt hesitate to \c
|
|
31
|
+
.UR https://github.com/rubygems/gemstash#contributing
|
|
32
|
+
open a bug report
|
|
33
|
+
.UE \c
|
|
34
|
+
!
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
4mgemstash-debugging24m(7)
|
|
1
|
+
4mgemstash-debugging24m(7) Miscellaneous Information Manual 4mgemstash-debugging24m(7)
|
|
2
2
|
|
|
3
3
|
1mDebugging Gemstash0m
|
|
4
4
|
If you are finding Gemstash isn't behaving as you would expect, you
|
|
5
5
|
might want to start by looking at the server log. You can find the log
|
|
6
|
-
at
|
|
7
|
-
|
|
6
|
+
at server.log within your base directory. By default, this will be at
|
|
7
|
+
~/.gemstash/server.log.
|
|
8
8
|
|
|
9
9
|
You might find it easier to view the log directly in your terminal.
|
|
10
10
|
Gemstash outputs its log directly to standard out:
|
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
$ gemstash status
|
|
17
17
|
|
|
18
|
-
The
|
|
19
|
-
(https://github.com/puma/puma#controlstatus-server).
|
|
18
|
+
The server status is checked by passing through to 8;;https://github.com/puma/puma#controlstatus-serverpumactl8;;.
|
|
20
19
|
|
|
21
|
-
If
|
|
22
|
-
(https://github.com/rubygems/gemstash#contributing)!
|
|
20
|
+
If you find a bug, please don't hesitate to 8;;https://github.com/rubygems/gemstash#contributingopen a bug report8;;!
|
|
23
21
|
|
|
24
22
|
October 28, 2015 4mgemstash-debugging24m(7)
|
|
@@ -1,39 +1,21 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
|
|
4
|
-
.\" that render this, and otherwise B font.
|
|
5
|
-
.ie "\f[CB]x\f[]"x" \{\
|
|
6
|
-
. ftr V B
|
|
7
|
-
. ftr VI BI
|
|
8
|
-
. ftr VB B
|
|
9
|
-
. ftr VBI BI
|
|
10
|
-
.\}
|
|
11
|
-
.el \{\
|
|
12
|
-
. ftr V CR
|
|
13
|
-
. ftr VI CI
|
|
14
|
-
. ftr VB CB
|
|
15
|
-
. ftr VBI CBI
|
|
16
|
-
.\}
|
|
17
|
-
.TH "gemstash-deploy" "7" "October 25, 2015" "" ""
|
|
18
|
-
.hy
|
|
3
|
+
.TH "gemstash\-deploy" "7" "October 25, 2015" ""
|
|
19
4
|
.SH Deploying Gemstash
|
|
20
|
-
.PP
|
|
21
5
|
Bundler is here for the rescue to keep Gemstash up to date!
|
|
22
|
-
Create a \f[
|
|
6
|
+
Create a \f[CR]Gemfile\f[R] pointing to Gemstash:
|
|
23
7
|
.IP
|
|
24
|
-
.
|
|
25
|
-
\f[
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
\f[R]
|
|
30
|
-
.fi
|
|
8
|
+
.EX
|
|
9
|
+
\f[I]# ./Gemfile\f[R]
|
|
10
|
+
source \(dqhttps://rubygems.org\(dq
|
|
11
|
+
gem \(dqgemstash\(dq
|
|
12
|
+
.EE
|
|
31
13
|
.PP
|
|
32
|
-
Then \f[
|
|
33
|
-
When you are ready to upgrade, simply \f[
|
|
34
|
-
You may need to run \f[
|
|
35
|
-
Alternatively, you can \f[
|
|
36
|
-
\f[
|
|
14
|
+
Then \f[CR]bundle\f[R] to create your \f[CR]Gemfile.lock\f[R].
|
|
15
|
+
When you are ready to upgrade, simply \f[CR]bundle update\f[R].
|
|
16
|
+
You may need to run \f[CR]gemstash\f[R] via \f[CR]bundle exec\f[R].
|
|
17
|
+
Alternatively, you can \f[CR]gem uninstall gemstash\f[R] and
|
|
18
|
+
\f[CR]gem install gemstash\f[R] when you want to upgrade.
|
|
37
19
|
.PP
|
|
38
20
|
Gemstash will automatically run any necessary migrations, so updating
|
|
39
21
|
the gem is all that needs to be done.
|
|
@@ -41,46 +23,42 @@ the gem is all that needs to be done.
|
|
|
41
23
|
It is probably wise to stop Gemstash before upgrading, then starting
|
|
42
24
|
again once you are done:
|
|
43
25
|
.IP
|
|
44
|
-
.
|
|
45
|
-
\f[C]
|
|
26
|
+
.EX
|
|
46
27
|
$ bundle exec gemstash stop
|
|
47
28
|
$ bundle update
|
|
48
29
|
$ bundle exec gemstash start
|
|
49
|
-
|
|
50
|
-
.fi
|
|
30
|
+
.EE
|
|
51
31
|
.SS Monitoring
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
server_health_check
|
|
55
|
-
|
|
56
|
-
|
|
32
|
+
Health monitoring is built in to Gemstash using the \c
|
|
33
|
+
.UR https://github.com/on-site/server_health_check-rack
|
|
34
|
+
server_health_check\-rack
|
|
35
|
+
.UE \c
|
|
36
|
+
\ gem.
|
|
37
|
+
If you request \f[CR]/health\f[R] from your Gemstash instance, you will
|
|
57
38
|
get a JSON response along with an HTTP status code indicating success or
|
|
58
39
|
failure.
|
|
59
40
|
The JSON response will look something like this for a success case:
|
|
60
41
|
.IP
|
|
61
|
-
.
|
|
62
|
-
\f[C]
|
|
42
|
+
.EX
|
|
63
43
|
{
|
|
64
|
-
\
|
|
65
|
-
\
|
|
66
|
-
\
|
|
67
|
-
\
|
|
68
|
-
\
|
|
69
|
-
\
|
|
44
|
+
\(dqstatus\(dq: {
|
|
45
|
+
\(dqheartbeat\(dq: \(dqOK\(dq,
|
|
46
|
+
\(dqstorage_read\(dq: \(dqOK\(dq,
|
|
47
|
+
\(dqstorage_write\(dq: \(dqOK\(dq,
|
|
48
|
+
\(dqdb_read\(dq: \(dqOK\(dq,
|
|
49
|
+
\(dqdb_write\(dq: \(dqOK\(dq
|
|
70
50
|
}
|
|
71
51
|
}
|
|
72
|
-
|
|
73
|
-
.fi
|
|
52
|
+
.EE
|
|
74
53
|
.PP
|
|
75
54
|
This request will test storage and database access and report on the
|
|
76
55
|
result.
|
|
77
56
|
Each key in the status can be requested alone to just report on that
|
|
78
57
|
status.
|
|
79
|
-
For example, if you would like a health check that doesn\
|
|
80
|
-
with storage or the database, you can use \f[
|
|
58
|
+
For example, if you would like a health check that doesn\(cqt interact
|
|
59
|
+
with storage or the database, you can use \f[CR]/health/heartbeat\f[R]
|
|
81
60
|
which will always respond with a success while your Gemstash server is
|
|
82
61
|
running.
|
|
83
62
|
.SS Downgrading
|
|
84
|
-
.PP
|
|
85
63
|
It is not recommended to go backwards in Gemstash versions.
|
|
86
64
|
Migrations may have run that could leave the database in a bad state.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
4mgemstash-deploy24m(7)
|
|
1
|
+
4mgemstash-deploy24m(7) Miscellaneous Information Manual 4mgemstash-deploy24m(7)
|
|
2
2
|
|
|
3
3
|
1mDeploying Gemstash0m
|
|
4
4
|
Bundler is here for the rescue to keep Gemstash up to date! Create a
|
|
5
|
-
|
|
5
|
+
Gemfile pointing to Gemstash:
|
|
6
6
|
|
|
7
|
-
# ./
|
|
7
|
+
4m#24m 4m./Gemfile0m
|
|
8
8
|
source "https://rubygems.org"
|
|
9
9
|
gem "gemstash"
|
|
10
10
|
|
|
11
|
-
Then
|
|
12
|
-
grade, simply
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
Then bundle to create your Gemfile.lock. When you are ready to up-
|
|
12
|
+
grade, simply bundle update. You may need to run gemstash via bundle
|
|
13
|
+
exec. Alternatively, you can gem uninstall gemstash and gem install
|
|
14
|
+
gemstash when you want to upgrade.
|
|
15
15
|
|
|
16
16
|
Gemstash will automatically run any necessary migrations, so updating
|
|
17
17
|
the gem is all that needs to be done.
|
|
@@ -24,12 +24,11 @@
|
|
|
24
24
|
$ bundle exec gemstash start
|
|
25
25
|
|
|
26
26
|
1mMonitoring0m
|
|
27
|
-
Health
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
success case:
|
|
27
|
+
Health monitoring is built in to Gemstash using the
|
|
28
|
+
8;;https://github.com/on-site/server_health_check-rackserver_health_check-rack8;; gem. If you request /health from your Gem-
|
|
29
|
+
stash instance, you will get a JSON response along with an HTTP status
|
|
30
|
+
code indicating success or failure. The JSON response will look some-
|
|
31
|
+
thing like this for a success case:
|
|
33
32
|
|
|
34
33
|
{
|
|
35
34
|
"status": {
|
|
@@ -41,11 +40,11 @@
|
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
This
|
|
45
|
-
result.
|
|
46
|
-
on
|
|
47
|
-
doesn't
|
|
48
|
-
|
|
43
|
+
This request will test storage and database access and report on the
|
|
44
|
+
result. Each key in the status can be requested alone to just report
|
|
45
|
+
on that status. For example, if you would like a health check that
|
|
46
|
+
doesn't interact with storage or the database, you can use
|
|
47
|
+
/health/heartbeat which will always respond with a success while your
|
|
49
48
|
Gemstash server is running.
|
|
50
49
|
|
|
51
50
|
1mDowngrading0m
|
|
@@ -1,54 +1,41 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
|
|
4
|
-
.\" that render this, and otherwise B font.
|
|
5
|
-
.ie "\f[CB]x\f[]"x" \{\
|
|
6
|
-
. ftr V B
|
|
7
|
-
. ftr VI BI
|
|
8
|
-
. ftr VB B
|
|
9
|
-
. ftr VBI BI
|
|
10
|
-
.\}
|
|
11
|
-
.el \{\
|
|
12
|
-
. ftr V CR
|
|
13
|
-
. ftr VI CI
|
|
14
|
-
. ftr VB CB
|
|
15
|
-
. ftr VBI CBI
|
|
16
|
-
.\}
|
|
17
|
-
.TH "gemstash-mirror" "7" "October 25, 2015" "" ""
|
|
18
|
-
.hy
|
|
3
|
+
.TH "gemstash\-mirror" "7" "October 25, 2015" ""
|
|
19
4
|
.SH Using Gemstash as a Mirror
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
don\[cq]t want to force everyone on your team to go through the Gemstash
|
|
5
|
+
If you don\(cqt have control over your \f[CR]Gemfile\f[R], or you
|
|
6
|
+
don\(cqt want to force everyone on your team to go through the Gemstash
|
|
23
7
|
server, you can use Bundler mirroring to bundle against your Gemstash
|
|
24
8
|
server.
|
|
25
9
|
.PP
|
|
26
|
-
For each source in your \f[
|
|
27
|
-
Gemstash server
|
|
10
|
+
For each source in your \f[CR]Gemfile\f[R], add a mirror pointing to
|
|
11
|
+
your Gemstash server.
|
|
12
|
+
Before upgrading, add every source other than the configured
|
|
13
|
+
\f[CR]:rubygems_url\f[R] to \f[CR]:allowed_upstreams\f[R] in
|
|
14
|
+
Gemstash\(cqs configuration.
|
|
15
|
+
Unlisted mirror sources return 403; list any CDN used for redirects in
|
|
16
|
+
\f[CR]:allowed_redirects\f[R].
|
|
17
|
+
The mirror source scheme must match its \f[CR]:allowed_upstreams\f[R]
|
|
18
|
+
entry (or \f[CR]:rubygems_url\f[R] for the default source).
|
|
19
|
+
For example:
|
|
28
20
|
.IP
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
$ bundle config mirror.
|
|
32
|
-
|
|
33
|
-
\f[R]
|
|
34
|
-
.fi
|
|
21
|
+
.EX
|
|
22
|
+
$ bundle config mirror.https://rubygems.org http://localhost:9292
|
|
23
|
+
$ bundle config mirror.https://my.gem\-source.local http://localhost:9292/upstream/$(ruby \-rcgi \-e \(aqputs CGI.escape(\(dqhttps://my.gem\-source.local\(dq)\(aq)
|
|
24
|
+
.EE
|
|
35
25
|
.PP
|
|
36
26
|
From now on, bundler will fetch gems from those sources via your
|
|
37
27
|
Gemstash server.
|
|
38
28
|
.SH Simpler Gemstash Mirrors
|
|
39
|
-
.PP
|
|
40
29
|
\f[B]This feature requires Bundler to be at least version
|
|
41
|
-
\f[
|
|
30
|
+
\f[CB]1.11.0\f[B].\f[R]
|
|
42
31
|
.PP
|
|
43
|
-
If you are using Bundler version \f[
|
|
32
|
+
If you are using Bundler version \f[CR]1.11.0\f[R] or greater, the
|
|
44
33
|
mirroring becomes a bit easier:
|
|
45
34
|
.IP
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
$ bundle config mirror.
|
|
49
|
-
|
|
50
|
-
\f[R]
|
|
51
|
-
.fi
|
|
35
|
+
.EX
|
|
36
|
+
$ bundle config mirror.https://rubygems.org http://localhost:9292
|
|
37
|
+
$ bundle config mirror.https://my.gem\-source.local http://localhost:9292
|
|
38
|
+
.EE
|
|
52
39
|
.PP
|
|
53
40
|
Bundler will then send headers to Gemstash to indicate the correct
|
|
54
41
|
upstream.
|