1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-06 12:45:57 +01:00
Commit Graph

77 Commits

Author SHA1 Message Date
Brent Baude
6ed4994b0d Implement generic scanning in Atomic
As more scanners besides openscap become available, atomic
can now begin to leverage them.  The new scan function has
been broken out into its on file (scan.py).

The scan command itself now defaults to openscap but can
also be switched to blackduck with --scanner.

Atomic now can use a configuration file which is stored
in /etc/atomic.conf.  The location of the atomic conf
file can be overriden with the environment variable
'ATOMIC_CONF'.  In the case of the scan function,
we need the scanner defined in the configuration file
as well as the fully qualified image name and the
scan arguments.  Optionally, you can provide additional
custom docker arguments for the scanner as well
2016-04-07 09:33:00 -05:00
Colin Walters
1365590b9f host: Pass through unlock -> ostree admin unlock
It's nicer for branding the command.  The more correct thing would be
to add it to the rpm-ostree daemon and pass through there, but we have
more important problems to fix for the production code path.  This is
just for local development, so the slightly dirty way is just fine.
2016-04-04 11:25:03 -04:00
Brent Baude
5da12a0e23 docs/atomic-diff.1.md --no-files fix
Fixing a minor mistake in the man page for atomic diff.
2016-03-01 11:07:32 -06:00
Daniel J Walsh
83f103badd Merge pull request #290 from chuanchang/fix_typos
docs: fix typo in atomic-stop.1.md
2016-01-20 06:22:25 -08:00
Alex Jia
548492b25a docs: fix typo in atomic-stop.1.md 2016-01-20 17:59:38 +08:00
Brent Baude
c71664ef97 Atomic/run.py: Add security implications messages based on RUN label
Laymen users who are told to run a image may not understand
the docker run switches that have security implications.  We
now look for the following switches:

* --privileged
* --cap-add
* --security-opt label:disable
* --net=host
* --pid=host
* --ipc=host

and output an appropriate security message.

Also, moved def run() from Atomic/atomic.py to Atomic/run.py
to reduce the size and the number of definitions in
Atomic/atomic.py.
2016-01-18 09:29:37 -06:00
Daniel J Walsh
0917a40cce Merge pull request #273 from baude/atomic_help
Atomic/help.py: Display man-like help for an image
2016-01-15 15:48:42 -05:00
Brent Baude
70427a5159 Atomic/help.py: Display man-like help for an image
Images or containers can now have an associated
man-like help page to help users understand more
about the image.  Typical information included
are things like a longer description, if the image
needs to be installed, security implications, steps
to upgrade, etc.

The default behavior is for atomic to display
a file called help.1 (in man format) located in
the / of the docker object.  This default
can be overriden with the HELP LABEL.  The
HELP LABEL needs to be a fully qualified
command to work correctly.
2016-01-15 10:02:58 -06:00
Charlie Drage
894ae3a0b9 Update Fedora installation documentation 2016-01-11 16:00:51 -05:00
Charlie Drage
91363b5e48 Update Debian install document for Atomic 1.8 2016-01-11 15:56:17 -05:00
Charlie Drage
aeb141751d Fix doc error in Debian installation docs 2016-01-04 16:08:00 -05:00
Antonio Murdaca
465ab1fc8f Atomic: top: add optional uid,gid,user,group to ps_args
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-23 18:19:41 +01:00
Daniel J Walsh
b66c2344da Merge pull request #257 from baude/baude_tests
Add tests for Atomic diff and top
2015-12-18 14:54:09 -05:00
Dusty Mabe
ec724f7bca Allow additional args to be provided to "stop". 2015-12-18 12:07:46 -05:00
Brent Baude
f7a38d4e44 Add tests for Atomic diff and top
Basic tests for atomic diff and top which should catch
basic code regressions.

In top.py, added -n for number of iterations.  And added
tty detection so that tests can pass in a jenkins environment
where there is no tty.
2015-12-17 11:01:37 -06:00
Brent Baude
f0900da257 Atomic Top Man
The man page for atomic top was accidently not commited in the
PR.
2015-12-11 15:31:01 -06:00
Brent Baude
2c7b463196 atomic verify: remote inspect and more details
With the remote_inspect function in RH docker, we can inspect
and image on a remote repository for various information like
versions (when present).  This allows us to expand atomic
verify to check a local version against a remote version.

atomic verify now can take an image as input (as before) and
provide a greater level of detail when checking each base
image (defined as a non-intermediate image).  It now iterates
on those base images looking for update status.

The output of atomic verify has also been changed slightly to
include a verbose option.  When invoked, the verify output
will list each base image with its versioning information.

The non-verbose output remains largely the same, where only
base images that have identified updates are put to stdout.
If verbose is not called for by the user but we find base
images with no version information, we output a warning
message and print verbosely anyway.

Updated man page
2015-12-10 13:53:22 -06:00
Brent Baude
cf6806cff5 Atomic TOP: Top-like display for container processes
Adding a new atomic sub-command that behaves like GNU top
but for processes being run for containers.  It currently
displays the container id,  container name,
pid, cpu% (as reported by docker
top), mem% (as reported by docker top), and the command.

You can optionally pass in -o ppid, stime, time to collect
more data on the processes themselves.

While in the interactive display, you can also sort on
the columns to re-organize the data as needed.

You can define an interval for refreshing the process
information.

atomic top can be run without any additional
parameters.  If that is the case, it will by default
show processes for all active containers.  You can also
add one or more container_ids for exclusive process
monitoring by container.

Also added an AtomicDocker class to atomic.py which
allows for custom docker, python-api calls without
having to re-invent the wheel.
2015-12-10 11:24:08 -06:00
Brent Baude
6e24d6bcdb Introduce 'atomic diff'
Allow users to diff between two docker images|container. There
    are two types of diffs that can be run -- a file diff or an
    RPM diff.  The file diff is always the default.  The RPM diff
    can be added with -r.  The file diff can be excluded with -n.
2015-11-23 15:46:06 -06:00
Shishir Mahajan
5490e26820 Atomic migrate command: Fix review comments
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2015-11-13 10:10:12 -05:00
Shishir Mahajan
fd7d6b1006 Atomic migrate command: Added bash completion and man pages
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2015-11-12 11:58:10 -05:00
Matthew Barnes
509cc0c58b host: Proxy new rpm-ostree deploy command
Can deploy a specific ostree image by version number.
2015-11-09 13:17:10 -05:00
Charlie Drage
65a92cd245 Update Debian.md 2015-10-23 12:03:55 -04:00
Martin Preisler
ae19438a6b Fixed up atomic-scan.1.md to be consistent with the fetch_cves arg
Previously the old "--no-cache" was mentioned and "fetch-cves" was used
instead of "fetch_cves".

Using --fetch-cves resulted in:
atomic: unrecognized arguments: --fetch-cves=False
2015-10-16 18:31:32 +02:00
Brent Baude
3d4aff4e79 Atomic_scan: add option to override fetching of new CVE data
* The openscap-daemon can now optionally take a switch
      to override the behavior defined in its configuration
      file as to whether to fetch new CVE input data or
      not.

        --fetch_cves is now a bool (True|False) where true
            means to pull new, false means do not attempt
            to pull aka "phone home"

    * Added timeout value of 99999 to override the default dbus
      connection timeout of 25 seconds.  This allows longer
      scans to complete and not throw an Exception.

    * Added a small def to detect a bool value based on True,
      true, yes, y, 1 and so on
2015-10-15 15:14:05 -05:00
Antonio Murdaca
c5c3e3f2b9 docs: atomic-stop.1.md: remove --name flag from example
`docker kill` doesn't support a `--name` flag, just container name/id
directly.

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
2015-10-05 20:22:28 +02:00
Daniel J Walsh
4bec1d8d4d Merge pull request #170 from rhatdan/removeopt
Remove opt documentation, but continue support
2015-09-29 14:57:50 -04:00
Dan Walsh
87a4c8a7cb Fix documentation/help information 2015-09-29 10:47:48 -04:00
Dan Walsh
2d66fdcc13 Remove opt documentation, but continue support
opt1, opt2 and opt3 can be specified as environment variables.

OPT1=--debug atomic install foobar

No reason to have options.
2015-09-24 12:10:06 -04:00
Dan Walsh
78589573a9 Remove automatic setting of CONFDIR, DATADIR and LOGDIR
Users can do this themselves by using the ${NAME} field.

Hard coding behaviour of these three variables was a mistake, and this
is a lot more flexible.  I could add back the variables and don't document them
if people think someone has used them
2015-09-14 09:17:01 -04:00
Brent Baude
c9b154eb59 atomic - Add CVE scan atomic
Add the ability to scan a container or image leveraging
    a containerized version of the openscap-daemon and atomic.

    i.e. atomic scan image_id

    man page added

    python3 fixes for this content
2015-09-13 09:07:23 -05:00
Dan Walsh
d242bc6513 Change upload to push
Leave aliase of upload
2015-09-01 08:11:34 -04:00
Dan Walsh
4f45fc0467 Add missing options to man pages 2015-08-31 09:41:10 -04:00
Daniel J Walsh
cfeb1e3b5f Merge pull request #136 from charliedrage/master
added debian install support and doc
2015-08-28 07:06:33 -04:00
Charlie Drage
190f396d3d added debian install support and doc 2015-08-27 15:08:40 -04:00
Sally O'Malley
d3048a3d1c typo atomic-update.1.md
Signed-off-by: Sally O'Malley <somalley@redhat.com>
2015-08-27 13:29:05 -04:00
Sally O'Malley
904588f97e atomic man fixes
Signed-off-by: Sally O'Malley <somalley@redhat.com>
2015-08-26 11:44:10 -04:00
Daniel J Walsh
ddb3470b33 Merge pull request #123 from aveshagarwal/master-fixes-2
Fixes a typo.
2015-08-23 06:16:19 -04:00
Avesh Agarwal
f74c89e431 Fixes a typo. 2015-08-21 11:16:50 -04:00
jramseye
6e1f4ddef3 Started adding support for satellite in addition to pulp. Need to test it and integrate it into the rest of the system. Waiting on Satellite server to test with. Jenny Ramseyer
Added a push-to-satellite function, might have gotten the config stuff to work.  Jenny Ramseyer

refactoring and adding documentation

rechecked API calls.  More documentation

it builds.  Still not sure the config file parser is going to work--need to check section headings, but it builds.  Jenny Ramseyer

switched false to true in config.py

debugging the REST API calls

more bug fixing. May have fixed payload, need to check.  Have to decide what to do about publish

Fixed.  It should work now.  Need to fiddle around with create_repo more, but the rest should be good.  Thanks to David Davis for help with uploading an image.

debugging create_repo

fixing build error.

fixing some build errors.  Still can't push to Satellite or Pulp.  Not sure why, working on that.  Jenny Ramseyer

more bug fixing, cleaning up CLI

minor tweaks

fixed the push to pulp/satellite problem!  Thanks to Alec and Will for the help!  Now new error

Seems to be working now

Hooray it works.  Now we're getting connection errors, which I will try to debug. But I think it works.  Might have messed up an API call, which is why it won't connect?  Or maybe it is a server problem?  I will investigate.  --Jenny Ramseyer

committing before merge

Sending in this as a pull request.

satellite and pulp are now mutually exclusive arguments

Fixed the authentication problems in the code.

Debugging upload calls

Added debug mode

Figured out how to get content view id, org id, repo id, etc.  This relies on the user knowing their activation key, which I am not sure we can count on, but I think we can.  Currently it has the problem that we automatically take the first product id, which is wrong in many cases.  But, we can't let the user input the product id (they don't have it--the satellite web UI gives them a product id, but it is different from the internal product ids).  The other option would be to have the user input the name of the desired product, but that relies on them inputting it exactly as in the json output, which seems unlikely.  Also not very elegant.

Fixed the post request such that now, when we send a no-data post request, the _no data_ is seen as a json file, so the request goes through (this was to fix the problem where the server was rejecting our requests to get an upload id)

Note: you need to run this with sudo, which means that you need the admin file on your root directory (at least, in my case I needed to run it that way)

Turns out that, while the user doesn't see the activation key number on the website, it is in the URL of the activation key page

updated manpage

fixed some bugs, upload still doesn't work

Switched to multipart request

Fixed the uploading bug.  Now I have a different uploading bug, but it seems much more tractable.  Will update as progress continues

Now I get a 405 method not allowed error.  Not sure what's happening with that, but I will keep investigating

Now we require the user to pass in both the repo and the activation key.  This is standard for Satellite, and saves us from the horrible hacks I did before.  More robust code.  Problem is that both of these numbers are only available in the URL to their respective pages in the Satellite UI

Added to man page.  Also added better error handling for uploading

It works now.  Hooray

fixed it so we don't actually need to take a tar file.

Better error handling

fixed upgroup, haven't fixed bash yet

got bash completion working.

Moving push image to satellite/pulp to their respective files, instead of util

adding helpful configuration comment

making everything pep8 compatible

reverting back to old system

modified to make pep8 compatible

Signed-off-by: jramseye <jramseye@redhat.com>
2015-08-21 09:31:47 -04:00
Avesh Agarwal
b4da5b97ae This removes --name \${NAME} from atomic install and uninstall man pages
because it is error prone to use it this way. Using the same NAME in the
environment variable -e NAME=\${NAME} and in container name (--name) for
install and uninstall seems incorrect because both of them serve
different purposes. Also if NAME is being used to create a container in
the install script, which happens most of the time, it leads to failure
because the same NAME is used for the ephemeral container to process
LABEL INSTALL and due to that, the actual container can not be created
and it gives following error:
"Error response from daemon: Conflict. The name "etcd1" is
already in use by container b50ea8bf1d40."

Anyway assigning names (using -name NAME) to ephemeral containers during
install and uninstall does not make much sense in my point of view.
2015-08-19 16:11:11 -04:00
Dan Walsh
0487a1d73f We removed defaults command a while ago.
Remove man page.
2015-08-10 15:14:53 -04:00
Dan Walsh
4e6f492336 Add missing -v --version to man page 2015-07-30 11:46:44 -04:00
Alex Jia
6e2691e682 docs: fix typos
Signed-off-by: Alex Jia <ajia@redhat.com>
2015-07-29 13:38:23 +08:00
Sally O'Malley
c13019c43e WIP: Add --display to run|install
Use --display to view run or install commands without
executing the commands.  This is useful when working with custom images
with LABEL methods defined.

Signed-off-by: Sally O'Malley <somalley@redhat.com>
2015-07-27 16:51:23 -04:00
Dan Walsh
efb6af78cd Add missing docs updates for OPT1,2,3 2015-07-22 14:38:51 -04:00
William Temple
bb3ae02178 Integrate remote inspection with Atomic info.
Signed-off-by: William Temple <wtemple@redhat.com>
2015-07-20 16:16:12 -04:00
William Temple
23b74aedd0 Atomic images completions and man-page changes
Signed-off-by: William Temple <wtemple@redhat.com>
2015-07-14 10:32:46 -04:00
Daniel J Walsh
f420dbdaae Merge pull request #85 from willmtemple/mount-overlay-backend
OverlayFS DockerMount backend for atomic mount command.
2015-07-10 15:17:14 -04:00
Daniel J Walsh
97c2a9e8d6 Merge pull request #82 from rhatdan/images
Add support for listing images for atomic
2015-07-10 15:09:51 -04:00