Skip to content

Commit

Permalink
Upgrade bundler to 2.2.19 to fix CVEs
Browse files Browse the repository at this point in the history
  • Loading branch information
hammady committed Jun 9, 2021
1 parent fac7489 commit b338dd6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ label maintainer="Hossam Hammady <[email protected]>"
ENV NEW_RELIC_LOG=stdout
ENV NEW_RELIC_AUTOSTART_DENYLISTED_CONSTANTS=Scaltainer

RUN gem install bundler --version 2.2.19

WORKDIR /home
COPY / /home/
RUN bundle install && bundle exec rake install

ENTRYPOINT ["scaltainer"]
ENTRYPOINT ["bundle", "exec", "scaltainer"]

CMD ["-h"]
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.15)
bundler (>= 2.2.10)
coderay (~> 1.1)
coveralls (~> 0.8)
rake (>= 12.3.3)
rspec (~> 3.5)
scaltainer!

BUNDLED WITH
1.17.3
2.2.19
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,43 @@ Install using rubygems:

For Docker swarm:

scaltainer -o swarm
bundle exec scaltainer -o swarm

Or simply:

scaltainer
bundle exec scaltainer

For Kubernetes:

scaltainer -o kubernetes
bundle exec scaltainer -o kubernetes


This will do a one-time check on the running docker service replicas
or Kubernetes replication controllers, replica sets, or deployments.
Then it sends scaling out/in commands to the cluster as appropriate.
Configuration is read from `scaltainer.yml` by default. If you want to read from another file add `-f yourconfig.yml`:

scaltainer -f yourconfig.yml
bundle exec scaltainer -f yourconfig.yml

Note that after each run a new file is created (`yourconfig.yml.state`) which stores the state of the previous run.
This is because there are some configuration parameters (like sensitivity) need to
remember previous runs.
If you want to specify a different location for the state file, add the `--state-file` parameter.
Example:

scaltainer -f /path/to/configuration/file.yml --state-file /path/to/different/state/file.yml
bundle exec scaltainer -f /path/to/configuration/file.yml --state-file /path/to/different/state/file.yml

Typically one would want to repeatedly call scaltainer every minute or so. To do this
specify the wait time between repetitions using the `-w` parameter in seconds:

scaltainer -w 60
bundle exec scaltainer -w 60

This will repeatedly call scaltainer every 60 seconds, sleeping in-between.

If you would like to monitor the changes in scaling out and in. You can install
Prometheus and add a configuration parameter pointing to its Push Gateway:

scaltainer -g prometheus-pushgateway.monitoring.svc.cluster.local:9091
bundle exec scaltainer -g prometheus-pushgateway.monitoring.svc.cluster.local:9091

Where `prometheus-pushgateway.monitoring.svc.cluster.local:9091` is the address
of the push gateway. For Kubernetes environments the above denotes the gateway service
Expand Down
2 changes: 1 addition & 1 deletion scaltainer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.15"
spec.add_development_dependency "bundler", ">= 2.2.10"
spec.add_development_dependency "rake", ">= 12.3.3"
spec.add_development_dependency 'rspec', '~> 3.5'
spec.add_development_dependency 'coderay', '~> 1.1'
Expand Down

0 comments on commit b338dd6

Please sign in to comment.