1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-05 18:45:01 +01:00

207 Commits

Author SHA1 Message Date
Giuseppe Scrivano
e045e8baef syscontainers: --user uses runc by default
bwrap-oci can still be used with the --runtime option.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1226
Approved by: rhatdan
2018-04-26 15:55:43 +00:00
Giuseppe Scrivano
873f0b6aaf syscontainers: drop pull from a remote ostree
this code was added for pulling directly from an OSTree repository.  It
wasn't never really used and it expects the image to be fully exploded
in an ostree commit without supporting OCI layers.

Dropping this part also avoid confusion with what we do with Skopeo
where "ostree:" is supported both as source and destination.

Closes: https://github.com/projectatomic/atomic/issues/1193

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1197
Approved by: rhatdan
2018-02-26 13:57:52 +00:00
Giuseppe Scrivano
d9fd59d547 docs, install: fix path for runc and bwrap-oci
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1196
Approved by: rhatdan
2018-02-23 15:15:05 +00:00
Giuseppe Scrivano
df2c209c27 run: add option --runtime
it allows to select a different OCI runtime to use with atomic run.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1196
Approved by: rhatdan
2018-02-23 15:15:05 +00:00
Giuseppe Scrivano
6eebb86402 atomic, run: implement --set option
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1186
Approved by: baude
2018-02-19 16:03:47 +00:00
Tomas Tomecek
d69f76580b depend on version 2 of docker-py
which is now available as 'docker' in PyPI and as a `python{2,3}-docker`
in Fedora.

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

Closes: #902
Approved by: rhatdan
2018-02-12 20:19:08 +00:00
Giuseppe Scrivano
f4cacde67f docs: add missing dependencies on Debian
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1171
Approved by: baude
2018-02-01 18:15:15 +00:00
Giuseppe Scrivano
b68436a19f syscontainers: allow way to override use-links
we use hard links now by default when copying files to /usr, allow a
way to override this behavior through the manifest file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1163
Approved by: peterbaouoft
2018-01-25 14:33:37 +00:00
Giuseppe Scrivano
a242c42871 validate: add option --all
it will validate all the images in a storage.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1150
Approved by: rhatdan
2018-01-05 09:35:43 +00:00
Giuseppe Scrivano
9218fe0516 containers, update: add --all option
If specified, tries to update all the installed containers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1136
Approved by: baude
2018-01-04 15:46:33 +00:00
Giuseppe Scrivano
a7a67c9d57 images, update: add --all option
If specified, pull the latest version for all the images in a
storage.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1136
Approved by: baude
2018-01-04 15:46:33 +00:00
Giuseppe Scrivano
e74f2dd256 syscontainers: expose ATOMIC
atomic run has some more features compared to a raw "$RUNTIME exec",
like the possibility to run a command for a service which is not started
yet.  Expose $ATOMIC as well during the installation so that a container
can more easily build a wrapper script for files inside the container.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1141
Approved by: baude
2017-12-15 14:35:27 +00:00
Giuseppe Scrivano
4979ce15c9 syscontainers: expose RUNTIME as a variable
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1141
Approved by: baude
2017-12-15 14:35:27 +00:00
Yiding Wang
9e012b3c5d fix building issue on Debian 2017-12-06 12:55:21 +08:00
Giuseppe Scrivano
dfc274d636 syscontainers: add a warning if pulling a not fully qualified image
Not fully qualified images are ambiguous in the ostree reference as
internally e.g. docker.io/busybox and busybox are stored as two
separate references.  Suggest the user to use a fully qualified name
to avoid the ambiguosity.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1124
Approved by: peterbaouoft
2017-11-20 21:23:11 +00:00
Giuseppe Scrivano
983a864338 syscontainers: allow runtime defined in the configuration file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1125
Approved by: TomSweeneyRedHat
2017-11-14 10:27:00 +00:00
Giuseppe Scrivano
e78ecdd216 install: add new option --runtime=PATH to choose the OCI runtime
it is supported by system and user containers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1125
Approved by: TomSweeneyRedHat
2017-11-14 10:27:00 +00:00
Giuseppe Scrivano
cd6af24d21 docs: document system container variables and files
This might not be the best place to add this information, but it is a
starting point to get it documented.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1121
Approved by: baude
2017-10-30 20:33:07 +00:00
Giuseppe Scrivano
24e1a61e99 pull: support src-creds option
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1120
Approved by: ashcrow
2017-10-26 16:49:44 +00:00
Giuseppe Scrivano
d2c4ee8197 docs, pull: add documentation for http: prefix
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1109
Approved by: miabbott
2017-10-13 15:21:38 +00:00
baude
9a5497f93d Atomic/scan.py: Add ability to remediate
In the case of some scanners, they generate a script to remediate the
images|containers they have scanned.  We needed to provide a hook
for this ability. We now read the scanner's configuration file looking
for a "remediation_script" key, whose value should be a fq path to the
remediation script.  The remediation script should be delivered via
the scanning image via atomic install.

As of now, we pass the id of the scanned object and its results directory
as named arguments to the remediation script.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1090
Approved by: baude
2017-09-22 15:53:57 +00:00
Martin Etmajer
2ecc4e1775 Add instructions on how to inject custom environment variables into a container.
Closes: #1053
Approved by: rhatdan
2017-07-25 18:58:37 +00:00
Matthew Barnes
898e762c4c Remove commissaire integration
Commissaire project has halted development.  Remove the integration
points so as not to accumulate cruft in the "atomic" subcommands.

Closes: #1046
Approved by: rhatdan
2017-07-24 12:00:09 +00:00
Giuseppe Scrivano
f3c6b8bb74 uninstall: inhibit UNINSTALL if there are running containers
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1456451

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1050
Approved by: rhatdan
2017-07-18 21:48:46 +00:00
Jan Černý
0d04058ebf Add configuration compliance scan to "atomic scan"
This commit enables scanning images and containers
for configuration compliance with security profiles
provided by SCAP Security Guide.
Note: This feature requires latest OpenSCAP Daemon from upstream
installed in the underlying "rhel7/openscap" container.

Closes: #1027
Approved by: baude
2017-06-15 18:18:31 +00:00
Brent Baude
2dfeae1356 Atomic/backends/_docker.py: Error prevention with atomic run
There were two primary cases where a secondary atomic run with a command
would trigger an exception.  The first was reported in
https://github.com/projectatomic/atomic/issues/1006. Basically it can
be summarized as:

```
atomic run registry.fedoraproject.org/fedora:25 date  # works fine
atomic run registry.fedoraproject.org/fedora:26 date  # tries to run in the existing f25 container
```

The second case is as simple as:

```
atomic run registry.fedoraproject.org/fedora:25 date  # works fine
atomic run registry.fedoraproject.org/fedora:25 date  # fails
```

This fails because atomic starts the stopped f25 container and then attempts a docker exec.  The
exec fails because the 'date' command is short-lived and the container exits prior to the exec
being run.

We now catch those exceptions and notify the user.  We added a `--replace` option to run where
atomic will now delete the container in question and re-run it from the correct image.

Closes: #1019
Approved by: baude
2017-05-31 19:20:25 +00:00
Tomas Tomecek
0e2d6457b2 add manpage for help command
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

Closes: #941
Approved by: rhatdan
2017-05-09 15:00:50 +00:00
Tomas Tomecek
e93b8319ad implement install --storage=docker --system-package=yes
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>

Closes: #955
Approved by: baude
2017-04-28 22:52:40 +00:00
Brent Baude
9525bfefa0 Allow anonymous push
Added an --anonymous switch to the push command to allow users
to push anonymously without having to be prompted for a username
and password.

Closes: #964
Approved by: rhatdan
2017-04-13 16:13:07 +00:00
Brent Baude
2b744bfdbb Honor proxy usage
If HTTP[S]_PROXY is defined, honor it in python requests usage
as well as pass it on to skopeo.

If http[s]_proxy is defined in atomic.conf, use it; however, environment
variables will override these if defined.

Added --insecure to Atomic push so the user can override the logic
(or lack thereof) around deducing if a registry is insecure.  Also
needed for integration tests.

Closes: #964
Approved by: rhatdan
2017-04-13 16:13:07 +00:00
Giuseppe Scrivano
a44d3db326 docs: document images tag
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #958
Approved by: rhatdan
2017-04-12 21:33:58 +00:00
Giuseppe Scrivano
5f3a498138 install: add --system-package
Drop the hidden option ---generate-rpm in favor of --system-package.

The new option controls how a system container is installed to the host:

--generate-rpm=build build the rpm file without installing it.
--generate-rpm=yes build the rpm and install it, the rpm is deleted.
--generate-rpm=no do not attempt to build and install an rpm file.
--generate-rpm=auto install the rpm only if a .spec file is defined in
  the image.  This is the default.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #767
Approved by: rhatdan
2017-03-22 13:27:53 +00:00
Shishir Mahajan
14bb4e2b0a Revert #915: Run container-storage-setup on atomic storage modify.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>

Closes: #936
Approved by: rhatdan
2017-03-16 13:32:09 +00:00
Yu Qi Zhang
ba34cc0275 Fix filtering
Change the format of "Created" for images to match containers,
fix filtering for partial keywords, and update auto-complete
and man pages.

Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>

Closes: #923
Approved by: giuseppe
2017-03-10 18:02:57 +00:00
Shishir Mahajan
064d6c503f Update man pages for atomic storage commands.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>

Closes: #918
Approved by: rhatdan
2017-03-01 18:16:11 +00:00
Shishir Mahajan
ab4e7cb0bb add --lvsize option to atomic storage modify
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>

Closes: #900
Approved by: rhatdan
2017-02-21 17:03:28 +00:00
Brent Baude
ed9eaf2e55 Fix Stop Regression: BZ #1422448
BZ #1422448 actually points out one regression and one
bug related to atomic stop. The BZ itself points out
a TypeError exception in the code when trying to glue
together a python list and str.

Then the atomic stop command was failling in the case where a
STOP label was defined and it uses the variable $NAME resulting
in a subprocess exception.

The self.name variable was not being set by set_args after
refactoring occured.  Ideally, this should all be moved
into the image|container object handling but for now we
just handle it in set_args.

Also added a test in test_display to catch any future
regressions.

Closes: #899
Approved by: rhatdan
2017-02-20 20:37:38 +00:00
Brent Baude
5cd25b9076 Refactor uninstall and add options
Refactor the uninstall class to use the backends, container and image
objects.

Add --display so one can run atomic uninstall --display <image>
and see what the outcome would be. This will be helpful in integration
testing and was discussed in BZ https://bugzilla.redhat.com/show_bug.cgi?id=1248038.

Add --storage option so users can dictate priority when uninstalling
an image.  This also mimics the newest install class as well.

Closes: #888
Approved by: giuseppe
2017-02-15 09:50:55 +00:00
Giuseppe Scrivano
15db71aec7 update: support update to a different image via --rebase
It allows to override the image to use for the update.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #883
Approved by: rhatdan
2017-02-12 16:17:12 +00:00
Shishir Mahajan
e17475d50f Add --rootfs and --lvname options to atomic storage modify.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>

Closes: #872
Approved by: rhatdan
2017-02-10 20:45:44 +00:00
Aaron Weitekamp
120b5d8ce1 Support adding pubkeys from local keyring
Closes: #878
Approved by: rhatdan
2017-02-08 00:05:19 +00:00
Aaron Weitekamp
ddc72a61e8 Inline pubkeys in policy.json
Closes: #853
Approved by: rhatdan
2017-02-06 22:41:40 +00:00
Brent Baude
02bd134f1c Add --storage to install|run
To have parity function with pull, we need to add --storage
to install and run.  This allows for overriding when atomic.type
is defined.  For example, if you pull an image that has
atomic.type=system but you really want to store it
on the docker backend.

Closes: #861
Approved by: baude
2017-02-04 17:05:24 +00:00
Aaron Weitekamp
650c961425 add trust reset command
Signed-off-by: Aaron Weitekamp <aweiteka@redhat.com>

Closes: #824
Approved by: rhatdan
2017-01-18 15:22:53 +00:00
Alex Jia
b496f589ef docs: add missing document into atomic images
Signed-off-by: Alex Jia <ajia@redhat.com>

Closes: #810
Approved by: rhatdan
2017-01-05 13:52:46 +00:00
Brent Baude
9f6612a9a2 Refactor atomic stop
Refactoring of atomic stop to use container objects and the new backend
methods.

Closes: #798
Approved by: rhatdan
2016-12-14 15:45:39 +00:00
yuqi-zhang
5cea34fc4a update: refactor into non-base verbs
Refactor:
  `atomic update`
  `atomic update --container`
  `atomic update --container --rollback`

To:
  `atomic images update`
  `atomic containers update`
  `atomic containers rollback`

And update corresponding tests, docs and auto-complete. Much like
other image commands (info, verify), the base verb is hidden but
still available for use.

Move update functionality from atomic.py to update.py, and use
new backendutils to abstract.

Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>

Closes: #773
Approved by: rhatdan
2016-12-12 21:56:55 +00:00
Dan Walsh
b49d6b23df Fixme: Fixes for documentation
Closes: #745
Approved by: rhatdan
2016-12-12 19:17:19 +00:00
Dan Walsh
d6bdd78c8d Atomic storage reset does not work on docker-latest
This patch will allow user to specify the graphdriver on atomic reset

If /var/lib/docker or /var/lib/docker-latest is the only thing installed
it will reset the correct path.  If both exists or the user as chosen
a different location, the --graph option must be specified.

Closes: #745
Approved by: rhatdan
2016-12-12 19:17:19 +00:00
Brent Baude
dc30815599 Unify and refactor atomic verify
Using our refactoring model, verify is now streamlined. We no longer
compare base images as that is not currently possible for both
V1 and V2 schemas.

Verify will now always look at the release and version labels for
comparison.  Should those labels not exist, it will use the
manifest digest for ostree; and it will use the image IDs for
docker.

Closes: #785
Approved by: rhatdan
2016-12-07 15:18:22 +00:00