diff --git a/Dockerfile b/Dockerfile index 6f020f44e5c06d96866a083ece6280a87368ca13..6a97b465128dff5af7105d8806d00e95264edce5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ ENV PYTHON_VERSION=3.6 \ ENV PROMPT_COMMAND=". /usr/bin/aap && unset PROMPT_COMMAND" # Copy extra files to the image. -COPY ./root / +COPY ./scripts /usr/bin RUN chmod a+x /usr/bin/container-entrypoint && \ chmod a+x /usr/bin/fix-permissions && \ chmod a+x /usr/bin/rpm-file-permissions && \ @@ -32,7 +32,7 @@ RUN chmod a+x /usr/bin/container-entrypoint && \ chmod a+x /usr/bin/aap # Install packages -RUN INSTALL_PKGS="vim-enhanced rsync iputils bind-utils git python36 python36-devel python3-setuptools python3-pip python3-virtualenv" && \ +RUN INSTALL_PKGS="vim-enhanced rsync iputils bind-utils git python36 python36-devel python3-setuptools python3-pip python3-virtualenv jq" && \ yum -y update-minimal --setopt=tsflags=nodocs --security && \ yum -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \ yum -y remove vim-minimal && \ @@ -55,9 +55,6 @@ RUN rpm --import /tmp/key.asc && \ rm -f /tmp/key.asc && \ rm -f /tmp/mongodb-org-shell-4.4.4-1.el8.x86_64.rpm -# Install jq (to parse openshift api query results) -RUN yum -y install jq - # # Instal helm COPY helm-v3.5.2-linux-amd64.tar.gz /tmp/helm-v3.5.2-linux-amd64.tar.gz RUN tar -zxvf /tmp/helm-v3.5.2-linux-amd64.tar.gz && \ diff --git a/README.md b/README.md index 5dc6fa6db4361c22da2f35edf0544d83ba6001e2..d9a8d0f104e37ab3399c0347fe83ee43c6bd904a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,23 @@ -# +# AAP Command Line Interface +_Deploy this container to your project and open a shell in it to gain access to command line tools that help you manage your project._ -Project template for all Iron Bank container repositories. \ No newline at end of file +![AAP CLI](images/aap-cli-screenshot.png "AAP CLI") + +## To use +This project is used to build the aap-cli image. To use it, add the container to your project by referencing the built image from a container repository (like Nexus). +TBD: Add from the AAP Catalog (look for AAP CLI) + +## Tools included +- `oc` (OpenShift CLI tool, v4.3.14) +- `git` (v2.18.4) +- `python` (v3.6) +- `mongo` shell (v3.6.18) + +## Ideas, things you can do with this +- Just use your browser... stop struggling with configuration of client-based shells like `git-bash` or Windows `cmd.exe` +- Use command line and text-based tools to organize your work and keep track of it with git SCM +- Perform troubleshooting and testing of other pods in your project using tools like `curl` and `pytest` + +## For help +- Find support in NAVAIR Fusion chat channel [#aap_support](https://chat.navair1.navy.mil/channel/aap_support) +- Check out the [AAP Wiki](https://wiki.navair1.navy.mil/display/Analytics/Advanced+Analytics+Platform) for user guides and further support diff --git a/hardening_manifest.yaml b/hardening_manifest.yaml index 8b5c53b7c3e59b70a864f8bd18159427f3bac243..2c87b9701d6efd8354dc92e88f56b534c2227a7d 100644 --- a/hardening_manifest.yaml +++ b/hardening_manifest.yaml @@ -54,13 +54,6 @@ resources: validation: type: "sha256" # supported: sha256, sha512 value: "01b317c506f8b6ad60b11b1dc3f093276bb703281cb1ae01132752253ec706a2" # must be lowercase - - url: "http://www.rpmfind.net/linux/centos/8.3.2011/AppStream/x86_64/os/Packages/perl-5.30.1-451.module_el8.3.0+406+78614513.x86_64.rpm" - filename: "perl-5.30.1-451.module_el8.3.0+406+78614513.x86_64.rpm" - validation: - type: "sha256" # supported: sha256, sha512 - value: "5af6605a7cfb477a60132992e679a4b5502c71b4636e8839cdba5f8ec580f368" # must be lowercase - - # List of project maintainers maintainers: diff --git a/image/aap-cli-screenshot.png b/image/aap-cli-screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..7ea0a6cd115d91d25087b8f9229b4aedcf06d106 Binary files /dev/null and b/image/aap-cli-screenshot.png differ diff --git a/root/usr/bin/container-entrypoint b/root/usr/bin/container-entrypoint deleted file mode 100644 index 339a74c197880c01b98183e3bbe296d746ebfe02..0000000000000000000000000000000000000000 --- a/root/usr/bin/container-entrypoint +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# temp: hard coding "hero" as container username (todo: fix to use env vars for username and homedir) -if [ `id -u` -ge 1 ]; then - echo "hero:x:`id -u`:`id -g`:here:/opt/app-root:/bin/bash" >> /etc/passwd -fi - -exec "$@" - diff --git a/root/usr/bin/aap b/scripts/aap similarity index 100% rename from root/usr/bin/aap rename to scripts/aap diff --git a/scripts/container-entrypoint b/scripts/container-entrypoint new file mode 100644 index 0000000000000000000000000000000000000000..66d8ac460d912611fb81911d5d92c6481219d290 --- /dev/null +++ b/scripts/container-entrypoint @@ -0,0 +1,4 @@ +#!/bin/bash + +exec "$@" + diff --git a/root/usr/bin/fix-permissions b/scripts/fix-permissions similarity index 100% rename from root/usr/bin/fix-permissions rename to scripts/fix-permissions diff --git a/root/usr/bin/generate-container-user b/scripts/generate-container-user similarity index 100% rename from root/usr/bin/generate-container-user rename to scripts/generate-container-user diff --git a/root/usr/bin/py-enable b/scripts/py-enable similarity index 100% rename from root/usr/bin/py-enable rename to scripts/py-enable diff --git a/root/usr/bin/rpm-file-permissions b/scripts/rpm-file-permissions similarity index 100% rename from root/usr/bin/rpm-file-permissions rename to scripts/rpm-file-permissions