-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added initial Dockerfile to create doppelganger image; ported in "scu…
…rler" code from a previous demo project.
- Loading branch information
Showing
4 changed files
with
428 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| FROM ubuntu:22.04 | ||
|
|
||
| #-- Set the specific version of bastion to install. | ||
| ENV BASTION bastion-q24A034X | ||
|
|
||
| RUN apt update && apt upgrade -y | ||
|
|
||
| RUN mkdir /SCRATCH && \ | ||
| mkdir /DATA && \ | ||
| mkdir /LOG && \ | ||
| mkdir /BFD && \ | ||
| mkdir /CONF && \ | ||
| mkdir /root/.private && \ | ||
| mkdir /root/.bastion && \ | ||
| mkdir /root/.ssh && \ | ||
| mkdir /etc/bastion | ||
|
|
||
| #-- Install the RCAC supplied hsi package | ||
| #-- Note, that the RCAC .deb package has an undeclared dependency on libedit2 | ||
| RUN apt install -y libedit2 | ||
| COPY hsi-htar-9.3.0-rcac1-amd64.deb . | ||
| RUN dpkg --install hsi-htar-9.3.0-rcac1-amd64.deb | ||
| RUN rm hsi-htar-9.3.0-rcac1-amd64.deb | ||
|
|
||
| #-- Python dependencies for bastion | ||
| RUN apt install -y \ | ||
| python3 \ | ||
| python3-yaml \ | ||
| python3-ruamel.yaml \ | ||
| python-is-python3 | ||
|
|
||
| #-- Install bastion from local tar file. | ||
| WORKDIR /opt | ||
| COPY ${BASTION}.tar . | ||
| RUN tar xvf ${BASTION}.tar | ||
| RUN ln -s /opt/${BASTION} /opt/bastion | ||
| RUN rm ${BASTION}.tar | ||
|
|
||
| WORKDIR / | ||
| COPY CONF/conf-000-dockerized.yaml /etc/bastion | ||
| COPY CONF/ssh_config /root/.ssh/config | ||
|
|
||
| #-- Useful stuff for debugging, but can probably be taken out of distribution. | ||
| RUN apt install -y \ | ||
| nano \ | ||
| git | ||
|
|
||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import pathlib | ||
|
|
||
| from Bastion.Movers.sCURL import SCURLer | ||
|
|
||
| USER = 'ndenny' | ||
| KEYPATH = pathlib.Path("~/.ssh/bastion_bot").expanduser() | ||
|
|
||
| LOCAL = pathlib.Path("/mnt/BFD/bastion/bank") | ||
| REMOTE = pathlib.Path("/home/{}/bastion".format(USER)) | ||
|
|
||
| SITE = "rusina" | ||
| ZONE = "soundscapes" | ||
| ASSET = "HackathonData" | ||
| BLONDE = "3AQXEGFS024A03CMFZMT.tar" | ||
|
|
||
| fortress = SCURLer(USER, 'sftp.fortress.rcac.purdue.edu', keyfile = KEYPATH, silent = False, verbose = True) | ||
| home = fortress['/home/{}'.format(USER)] | ||
| bastion = fortress['/home/{}/bastion'.format(USER)] | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| """ | ||
| Bastion.Movers | ||
| I am the collection of codes for the transfer ("mover") agents | ||
| """ |
Oops, something went wrong.