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

123 Commits

Author SHA1 Message Date
Shishir Mahajan
aa7114a8f1 Add atomic containers trim
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>

Closes: #572
Approved by: rhatdan
2016-09-07 20:02:33 +00:00
Mahmoud Tohmaz
c66bf4e32c Atomic will mount/unmount a user image.
Ostree already has functionality to extract images as non-root user. This involves changing OSTree's checkout mode to USER (only if the image's repo was created with BARE_USER mode).
Atomic will then ignore calls to mount_path since there is no need to run the mount systemcall since ostree checkout already takes care of thata.

Also added changes to allow atomic to unmount an image previously mounted by non-root user. This involves a patch to atomic mount to change permissions of the image once mounted. It then removes symbolic links before removing all the subdirectories in the specified mount directory.

Closes: #509
Approved by: rhatdan
2016-09-06 20:38:35 +00:00
Dan Walsh
a04847b5e5 Change options to the agreed syntax.
We agreed on using --sign-by for specifying the signer, and --directory
to specify the output directory for images.

Closes: #583
Approved by: rhatdan
2016-09-06 13:25:28 +00:00
Alex Jia
a6e953056b update man page
Signed-off-by: Alex Jia <ajia@redhat.com>

Closes: #573
Approved by: rhatdan
2016-09-06 12:31:08 +00:00
Alex Jia
314f9d5a3a docs/atomic-sign.1.md: fix lost command
Signed-off-by: Alex Jia <ajia@redhat.com>

Closes: #585
Approved by: rhatdan
2016-09-06 12:22:27 +00:00
Brent Baude
683c0fac9b Introduce signing
Allow atomic users to sign an images that has been pulled
from a repository.  This uses GPG, skopeo, and friends and
creates a local signature file for a image that has been
pulled locally.  Signatures are stored in the dir:

/var/lib/atomic/containers/registry/image_name@sha256:image_id/

Individual signature files are then stored as:

  ../signature-(INTEGER)

where INTEGER is incremented each time a signature
is added.

Closes: #539
Approved by: baude
2016-09-02 17:11:28 +00:00
Dan Walsh
29e7829fd8 Move atomic ps to atomic containers
As we add more commands related to containers, IE Trim, we need to make
containers be a subcommand and add verbs like list, and trim

Closes: #579
Approved by: giuseppe
2016-09-02 11:10:08 +00:00
Giuseppe Scrivano
d582ae4703 images: hide generate if gomtree is not available
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #567
Approved by: rhatdan
2016-08-29 18:46:29 +00:00
Giuseppe Scrivano
c8f83d99ed install: hide --system and --user if not supported
Check respectively that runc and bwrap-oci are available before showing
'install --system' and 'install --user'.

bwrap-oci is still not packaged and may not be available immediately on
RHEL.  The check for runc is added for completeness.

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

Closes: #567
Approved by: rhatdan
2016-08-29 18:46:29 +00:00
Dan Walsh
448654d68f Don't add host verb if not on atomic host
Check whether /run/ostree-booted file exists.  If it does then
add the host commands to the atomic command.

Also fix some of the descriptions in atomic man page.

Closes: #561
Approved by: cgwalters
2016-08-27 12:28:17 +00:00
Dan Walsh
1c0a36e416 Fix reference to containers/images in atomic mount help and man page
Closes: #563
Approved by: giuseppe
2016-08-26 22:01:14 +00:00
Colin Walters
49d81e884e images-list: Add --json
When trying to script `atomic` via Ansible, in order to implement
idempotence we need the ability to introspect the current state
in a machine-readable way.

`ps` already has `--json`, so teach `images list` about it too;
the implementation is trivial.

Closes: #548
Approved by: rhatdan
2016-08-21 10:02:27 +00:00
Giuseppe Scrivano
adaec5456d docs: add docs for verify --no-validate
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #536
Approved by: cgwalters
2016-08-19 14:14:24 +00:00
Jan Pazdziora
f97e97f172 Add support for LABEL RUN_OPTS_FILE and ${RUN_OPTS}
Closes: #541
Approved by: rhatdan
2016-08-19 13:02:26 +00:00
Dan Walsh
45ec779178 Move generate from atomic verify to atomic images
Also breakout images handling into a separate python file.

Atomic/images.py

I have switched atomic images generate to generate an images
mtree file for each image in the system.

Closes: #534
Approved by: giuseppe
2016-08-16 08:03:19 +00:00
yuqi-zhang
42c6094e3f syscontainers: add --rootfs to atomic install
Add --rootfs=ROOTFS to atomic install, which allows users to specify
an existing exploded container or existing rootfs location as ROOTFS.
The existing rootfs will be used as a read-only rootfs for the new
container to be installed, and therefore the new container would
only contain configuration files. (Note: currently all system
containers must have a read-only rootfs by default).

A use case for this would be using existing container's rootfs
through NFS, etc to serve as the rootfs for many containers running
the same image. This avoids duplicate storage of having a container
on each machine in a cluster.

A user can update only the remote container's config file parameters
with 'atomic update', and uninstalling a remote container does not
affect the rootfs specified in ROOTFS.

Closes: #527
Approved by: giuseppe
2016-08-12 22:07:36 +00:00
Stephen Chung
d4728ae10f verify: validate layers of system image stored on disk
Integrate go-mtree tool into atomic CLI command, `atomic verify -V <imagename>`.
(Note that `gomtree` is still in development and thus we would need some way of
obtaining updated gomtree binaries) When a user does an atomic pull,
validation manifests for that system image's layers are created and stored in
/var/lib/atomic. When user does `atomic verify -V <system image>`, these manifests
are then validated against the image that is on disk (which would be stored in ostree).

Signed-off-by: Stephen Chung <schung@redhat.com>

Closes: #531
Approved by: rhatdan
2016-08-12 18:55:44 +00:00
Giuseppe Scrivano
3bb5dbfe5a docs: document atomic install --user
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #524
Approved by: rhatdan
2016-08-09 17:00:29 +00:00
Giuseppe Scrivano
d1def191ad pull: drop option --user
Pull to the user repo by default when running as non root user

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

Closes: #524
Approved by: rhatdan
2016-08-09 17:00:29 +00:00
Marius Vollmer
b828b6fadf storage: Add --vgroup option to modify command
Closes: #519
Approved by: cgwalters
2016-08-05 17:18:07 +00:00
yuqi-zhang
6fcfea443d images: add more sub-commands to images
Add the following sub-commands to "atomic images list"

  --all: show all images, including intermediate images

  --filter: filter output based on given filters

  --quiet: only display image IDs

and corresponding bash auto-complete, tests, and documentation.

Closes: #502
Approved by: rhatdan
2016-07-29 12:19:21 +00:00
Alex Jia
75ec67137c docs: fix atomic-ps
Signed-off-by: Alex Jia <ajia@redhat.com>

Closes: #501
Approved by: giuseppe
2016-07-27 07:26:06 +00:00
Mahmoud Tohmaz
6d42041afe Atomic now has --user flag. 2016-07-25 20:48:25 -04:00
yuqi-zhang
45c0902529 atomic: add sub-commands to atomic ps
Add the following sub-commands to ps:

  --filter: filter output based on given VAR=VALUE

  --no-trunc: do not truncate output

  --quiet: only display container IDs

and corresponding bash auto-complete, tests, and documentation.

Closes: #493
Approved by: rhatdan
2016-07-25 19:07:50 +00:00
Jhon Honce
4abc3eb8c9 Refactor 'atomic images list --prune' to 'atomic images prune'
Update supporting files and tests

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #492
Approved by: rhatdan
2016-07-21 10:43:40 +00:00
Jhon Honce
eeac7339f7 Card container_security_114 - Add delete image support
* Add support for calling skopeo to delete v2 images from v2 registry
* Implement atomic images list --no-trunc
* Update documentation and bash tab expansion
* Cleanup code and comments
* Update integration tests

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #425
Approved by: rhatdan
2016-07-20 09:59:09 +00:00
Giuseppe Scrivano
41fd18e05d docs: add system containers info to "atomic mount"
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #480
Approved by: rhatdan
2016-07-15 13:44:51 +00:00
Giuseppe Scrivano
627b541a03 docs: add system containers info to "atomic install"
and don't split long lines

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

Closes: #480
Approved by: rhatdan
2016-07-15 13:44:51 +00:00
Giuseppe Scrivano
b863c9912b docs: improve the documentation for "atomic pull"
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #480
Approved by: rhatdan
2016-07-15 13:44:51 +00:00
Marius Vollmer
93a61218aa storage: Add options to remove-devices to "modify" sub-command
Closes: #418
Approved by: rhatdan
2016-07-12 15:30:11 +00:00
Giuseppe Scrivano
24f58941b7 atomic: add command "ps"
It is used to query the installed or running containers.

Unify in the same output Docker containers and system containers.

Also support --json to output the information in a machine readable
way.

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

Closes: #422
Approved by: rhatdan
2016-07-07 21:24:37 +00:00
Daniel J Walsh
9b417c8db5 Merge pull request #420 from chuanchang/fix_typos
Fix typos and update docs to follow --json switch was removed
2016-06-23 16:00:03 -04:00
Tomas Tomecek
b8815d56a8 document ways of connecting to docker engine
Resolves #41

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

Closes: #426
Approved by: rhatdan
2016-06-20 20:22:12 +00:00
Alex Jia
69803f11e2 docs/atomic-scan: update docs to follow --json switch was removed
Signed-off-by: Alex Jia <ajia@redhat.com>
2016-06-14 22:45:52 -04:00
Alex Jia
fe5ccf4d18 docs: fix typos
Signed-off-by: Alex Jia <ajia@redhat.com>
2016-06-14 22:45:52 -04:00
Matthew Barnes
f556415b4b atomic: Add cluster and rhost subcommands
Interfaces with a Commissaire server.

https://github.com/projectatomic/commissaire

Closes: #354
Approved by: jlebon
2016-06-10 19:19:36 +00:00
Dan Walsh
be7283d595 Add missing information on atomic mount --shared option
Missing from command completion and from man pages.
2016-06-03 13:23:59 -04:00
Giuseppe Scrivano
39245230c5 atomic: hide system containers options if OSTree is not present
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #398
Approved by: rhatdan
2016-05-31 19:56:32 +00:00
Brent Baude
d8b2d19d76 Indicate used in atomic images
When you run atomic images, we now indicate which images
have been used by a container. The indicator is the
'>' character and it preceeds the image name in the listing.
Also improved some output problems with long repository names.

Updated atomic images man page to reflect this change.

Closes: #394
Approved by: rhatdan
2016-05-31 18:06:53 +00:00
Dan Walsh
f027f871ea Add atomic images --noheading
In certain cases like piping to grep, you do not want to include headings
2016-05-29 06:12:34 -04:00
Dan Walsh
403b51a5ca Add support for modifying /etc/sysconfig/docker-storage-setup
atomic modify can be used to add devices to the storage backend.
It can also be used to switch the backend storage driver.

Closes: #385
Approved by: rhatdan
2016-05-23 15:32:20 +00:00
Brent Baude
35c18bc67d Atomic/diff: Improve docs and output messages for diff
https://github.com/projectatomic/atomic/issues/378 points out that
when an rpm diff is done with --names-only, the output messaging was
not clear enough.  Reworked the man page, --help, and output message
to clarify that when --names-only is used, it only compares RPMs
based on names and NOT versions.

Nice find by Micah.

Closes: #381
Approved by: rhatdan
2016-05-11 18:52:44 +00:00
Dan Walsh
640ad1bf41 Added atomic storage to handle resetting of storage
Also moved atomic migrate to atomic storage.

Currently we support
atomic storage export
atomic storage import
atomic storage reset

Closes: #365
Approved by: rhatdan
2016-05-11 10:51:14 +00:00
Dan Walsh
1641d081ab SELinux: Don't scan with selinux separation if scan is using rootfs
We don't have a way to relabel content off of random rootfs so that
a SELinux confined process can read the content.

Closes: #372
Approved by: rhatdan
2016-05-06 15:21:59 +00:00
Brent Baude
e67bf52a2a Atomic/scan.py: Add --rootfs option
Add the ability for atomic scan to deal with chroots on the host's
filesystem.  You can now pass a list of chroots to --rootfs and your
scanner will process them as if they were containers or images.  This
works with VMs too.

$ sudo virt-filesystems -d rhel7
/dev/sda1
/dev/sdb1
/dev/sdb2
/dev/rhel/home
/dev/rhel/root
$ sudo guestmount  -d rhel7 -m /dev/rhel/root --ro /tmp/rhel
$ sudo ./atomic scan --rootfs /tmp/rhel
...

Updated the man pages for atomic scan as well as it had fallen out of
date.

Small update that makes sure the host's os.environ is passed into
scanning container.

Closes: #371
Approved by: rhatdan
2016-05-05 15:45:46 +00:00
Giuseppe Scrivano
3d7691fb97 docs: add man pages for system containers new options
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-04-18 20:27:32 +02:00
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