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

1061 Commits

Author SHA1 Message Date
Dan Walsh
71d0ccbb2a Bump to v1.13.0 v1.13.0 2016-10-08 06:26:23 -04:00
Dan Walsh
3fd6c15297 Add dbus support for atomic stop
Closes: #682
Approved by: rhatdan
2016-10-08 09:56:20 +00:00
Dan Walsh
ea1bf06d98 Add dbus support for atomic install/uninstall
Closes: #682
Approved by: rhatdan
2016-10-08 09:56:20 +00:00
Dan Walsh
31527472c2 Add dbus support for atomic run
Closes: #682
Approved by: rhatdan
2016-10-08 09:56:20 +00:00
Dan Walsh
217bc6288c Add dbus support for atomic pull
Closes: #682
Approved by: rhatdan
2016-10-08 09:56:20 +00:00
Dan Walsh
57a223b401 Add dbus support for atomic top.
Also add missing force qualifier for ContainersDelete

Closes: #682
Approved by: rhatdan
2016-10-08 09:56:20 +00:00
Dan Walsh
3b486957de Remove primary commands and move to images subcommand
In order to cleanup code and simplify interface, i
move help, info, verify and version to the images subcommand.

Remove man pages for these atomic commands and add info to images subcommand.

Since these have been previously documented we will continue to support
atomic help
atomic info
atomic verify
atomic version

But we will not document them.

Closes: #676
Approved by: rhatdan
2016-10-08 09:46:56 +00:00
Brent Baude
aa59a5e285 Introduce registry inspect methods
Add two classes and several new methods for inspecting
registries and images.  These methods are helpful
for:

* taking user input (i.e. image names, partial image names) and determining
the fully qualified names.
* determining the fq name when the registry is omitted by the user.
* obtaining image manifests
* mimicing skopeo inspect

Closes: #687
Approved by: baude
2016-10-07 19:54:35 +00:00
Giuseppe Scrivano
f596f1205a syscontainers: rename some functions
they are part of the class SystemContainers, do not repeat
system_container in the name.

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

Closes: #683
Approved by: rhatdan
2016-10-06 11:07:34 +00:00
Giuseppe Scrivano
ad82d64520 syscontainers: allow to specify image id by its prefix
Raise an error if there are more images matching the same prefix.

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

Closes: #683
Approved by: rhatdan
2016-10-06 11:07:34 +00:00
Giuseppe Scrivano
73dc2554a9 syscontainers: support delete image by Id
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1382064

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

Closes: #683
Approved by: rhatdan
2016-10-06 11:07:34 +00:00
yuqi-zhang
20cc5ecfdd images: fix system images auto-complete
Image names are stored differently in ostree, and thus cannot be
directly used as we used to.

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

Closes: #681
Approved by: rhatdan
2016-10-06 10:11:37 +00:00
Brent Baude
e83c2c5dd8 Atomic.util: More robust decompose
Colleagues asked for decompose to be improved to where it took
an image name and broke it into registry, repo, image, and tag.
It also should mimic docker's implementation where 'library' is a known
exception

Also added unittests for decompose.  Removed a singular glob  test
as it is no longer valid

Closes: #677
Approved by: rhatdan
2016-10-05 17:00:11 +00:00
yuqi-zhang
075035a052 version: save and display system image info
Save labels from docker manifest into ostree, so when a user invokes
'atomic version' on a system image, the metadata info is displayed,
same as docker images.

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

Closes: #679
Approved by: giuseppe
2016-10-05 12:36:57 +00:00
Brent Baude
12a44fa563 Atomic/util.py: Fix error in strip port
An equality operator issue in strip port was causing failures.  Changed
'is' to '=='.

Closes: #678
Approved by: rhatdan
2016-10-05 12:22:44 +00:00
Giuseppe Scrivano
375bfb5740 syscontainers: inspect and checkout accept image Ids
If the image Id is specified, look it up in the available images
metadata.

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

Closes: #680
Approved by: rhatdan
2016-10-05 12:13:54 +00:00
Giuseppe Scrivano
d794fac676 syscontainers: do not delete conf files when extracting only
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #680
Approved by: rhatdan
2016-10-05 12:13:54 +00:00
Brent Baude
18f499df51 Atomic/push.py: Don't prompt for password if token found
If the user has a token for the registry, we assume the token
is good and do not prompt for a username or password.

Closes: #675
Approved by: rhatdan
2016-10-04 14:54:53 +00:00
Dan Walsh
1609f8d3af Code cleanup for atomic sign
We need to default the gnukeyring to the users login directory. To
make it easier for the user.

Also add bash completions for -g option

Closes: #671
Approved by: rhatdan
2016-10-04 14:44:12 +00:00
Dan Walsh
c0256dcfe6 Implement dbus interface for atomic commands
Add missing interfaces.

Fix functions to return text, rather then displaying directly.

Change atomic_client.py to take input from command line. These args are translated into function calls in python.

Add tests scripts in tests/integration/dbus directory

Closes: #668
Approved by: rhatdan
2016-10-04 14:31:42 +00:00
Brent Baude
5314b0be3f Atomic/sign.py: Input image must have registry name
Because we only intend atomic sign to create local signatures
of remote images, all input image names must have a registry
or we now fail.

Closes: #673
Approved by: rhatdan
2016-10-04 14:23:21 +00:00
Brent Baude
d7af4a1307 Atomic update and install: Use skopeo for pulling
Atomic update and install now use skopeo for pulling images
from registries.  This allows us to enforce signature policies
as part of pull and update operations.

Closes: #672
Approved by: rhatdan
2016-10-03 12:06:22 +00:00
Dan Walsh
c9a673a10c Change to devel branch 2016-10-03 08:01:32 -04:00
Dan Walsh
394beb9372 Fix handling of vulnerable images
Closes: #667
Approved by: rhatdan
2016-09-30 19:51:03 +00:00
Dan Walsh
61b03d3c94 Pass down default policy_filename to skopeo copy command
We need this for integration tests

Closes: #663
Approved by: rhatdan
2016-09-27 17:53:33 +00:00
Giuseppe Scrivano
2e2f1e27ba prune: delete refs with wrong encoding
older versions of atomic stored OSTree refs without any encoding.
Delete refs with the wrong encoding as they are not usable anyway.

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

Closes: #665
Approved by: rhatdan
2016-09-27 12:40:18 +00:00
Giuseppe Scrivano
71947f23f7 pull: import correctly images with xattrs
libarchive[1] does not handle xattrs found in the PAX extended header.
In such cases, fallback to extract the tarball and after import it
into OSTree.

[1] https://github.com/libarchive/libarchive/pull/691

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

Closes: #665
Approved by: rhatdan
2016-09-27 12:40:18 +00:00
Giuseppe Scrivano
fc0aea92ea syscontainers: remove tmpfiles conf file on error
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #665
Approved by: rhatdan
2016-09-27 12:40:18 +00:00
Dan Walsh
b807043930 Bump to v1.12.5 v1.12.5 2016-09-26 11:36:46 -04:00
Aaron Weitekamp
c00a1972df add keyring override config
Closes: #643
Approved by: rhatdan
2016-09-26 14:31:13 +00:00
Dan Walsh
09f5ec7861 Fixup man pages
Closes: #664
Approved by: cgwalters
2016-09-24 22:22:32 +00:00
Dan Walsh
b5b95b9efc Missing paths are causing failures in running atomic in cron job
We need to fully path executables in order for atomic command to
work with any $PATH set.

Basically cron jobs does not include /sbin in PATH.

Closes: #654
Approved by: rhatdan
2016-09-23 18:38:47 +00:00
Brent Baude
7968f22781 Atomic/push.py: Rely on skopeo to write signatures
atomic push should always rely on skopeo to write
signatures even when the signatures are being
written locally.

This addresses https://github.com/projectatomic/atomic/issues/660

Closes: #662
Approved by: baude
2016-09-23 18:22:08 +00:00
Aaron Weitekamp
653faf7c67 add TRUST_POLICY env var
Closes: #659
Approved by: rhatdan
2016-09-23 13:06:23 +00:00
root
488c096b77 adding line to create /var/lib/atomic/sigstore
Closes: #656
Approved by: rhatdan
2016-09-22 15:14:56 +00:00
root
3902a12089 Adding better error message when trying to pull w/ dockerd not running.
Closes: #656
Approved by: rhatdan
2016-09-22 15:14:56 +00:00
Dan Walsh
bd016ed4e9 Bump to v1.12.4 v1.12.4 2016-09-22 08:18:54 -04:00
yuqi-zhang
3e55ad6621 Start/stop syscontainers with atomic run/stop
Wrap atomic run/stop with systemctl start/stop for system
containers. This way the user can directly use the atomic
CLI for the full container cycle. In addition, the equivalent
functionality already exists for docker containers, so it
makes sense to allow system containers to start/stop in a
similar fashion.

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

Closes: #651
Approved by: rhatdan
2016-09-21 20:56:13 +00:00
Brent Baude
c20cc24d06 Atomic/pull.py: Fix logic error in pull
When a image without a registry is provided as input, i.e.

atomic pull busybox

We are not able to resolve that reference now because we can
no longer depend on docker's algo's for that as we now
use skopeo. Therefore, we now take the input, see if skopeo
inspect can resolve it; and then decompose the fqdn so we
can check if the registry is secure.  Had to make a small
change on the return types of util.decompose to ensure
it returns str objects or else it will return unicode in
python2.

Closes: #650
Approved by: rhatdan
v1.12.2
2016-09-21 20:37:13 +00:00
Dan Walsh
f9667bb01f Fix crash on handling atomic containers delete --all
Closes: #645
Approved by: cgwalters
2016-09-21 19:41:35 +00:00
Giuseppe Scrivano
57a0546010 syscontainers: store full image name
store the full image name, registry included, when pulling an image.

Some characters in the url are not usable for the name of an OSTree
ref, so escape them with '_'.  This change breaks old images already
pulled.

use "rm -rf /ostree/repo/refs/heads/ociimage" and pull the images
again.

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

Closes: #620
Approved by: cgwalters
2016-09-21 19:33:16 +00:00
Aaron Weitekamp
1cd5ba96b7 bugfix in discover_sigstore
Closes: #642
Approved by: rhatdan
2016-09-20 21:03:51 +00:00
Aaron Weitekamp
d551996d49 bugfix in trust discovery and image parsing
Closes: #640
Approved by: rhatdan
2016-09-20 16:40:20 +00:00
Brent Baude
f60218a679 Atomic/pull.py: Set docker as default backend
Setting docker as the default backend instead of ostree.

Closes: #637
Approved by: rhatdan
2016-09-20 16:07:32 +00:00
Aaron Weitekamp
e0c8e1d78c handle setting args when pulling image
Closes: #638
Approved by: rhatdan
2016-09-20 13:52:48 +00:00
Dan Walsh
bc0141b511 Bump to 1.12.3 v1.12.3 2016-09-20 07:35:28 -04:00
Dan Walsh
f439d70f7a Add additional bash completions for push/pull
Closes: #635
Approved by: rhatdan
2016-09-20 09:20:59 +00:00
Brent Baude
384643a93e Atomic/push.py: Implement push with signing
Enabling signing and pushing at the same time.  At the time of
this writing, we cannot verify that the atomic targets are
working but the code is there.  THis is enabled with the
--type atomic switch. Otherwise, signatures are written locally
and the image is pushed.

Closes: #631
Approved by: rhatdan
2016-09-20 08:56:36 +00:00
Aaron Weitekamp
0870507325 add atomic trust show
Closes: #629
Approved by: rhatdan
2016-09-20 08:48:20 +00:00
Aaron Weitekamp
b66284fb81 refactor trust
Closes: #629
Approved by: rhatdan
2016-09-20 08:48:20 +00:00