Skip to content

Commit bf65ddf

Browse files
authored
Merge pman (#149)
* Fix dev environment and add pman dependencies * Refactor storage modules into their own package * Add pman's code packages and modules * Fix pfcon tests * Make docker the default container environment * Remove reference to pman * Add pman's automated tests * Integrate pman's README * Use plain docker environment for CI instead of docker swarm
1 parent 7a73a17 commit bf65ddf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+7161
-4653
lines changed

.gitattributes

100644100755
File mode changed.

.github/workflows/ci.yml

100644100755
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@ jobs:
1717
runs-on: ubuntu-24.04
1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Start Docker Swarm
21-
run: docker swarm init --advertise-addr 127.0.0.1
2220
- name: Build and run tests
2321
run: ./make.sh -i
2422
- name: Tear down
2523
run: |
2624
./unmake.sh
2725
sudo rm -fr ./CHRIS_REMOTE_FS
28-
docker swarm leave --force
2926
test-cube:
3027
name: tests (CUBE)
3128
runs-on: ubuntu-24.04

README.rst

Lines changed: 203 additions & 76 deletions
Large diffs are not rendered by default.

kubernetes/pfcon_dev.yaml

Lines changed: 12 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,28 @@ spec:
3737
app: pfcon
3838
env: development
3939
spec:
40-
initContainers:
41-
- name: init-pfcon
42-
image: busybox:1.32
43-
command: [ 'sh', '-c', "until wget --spider -S -T 2 http://pman:5010/api/v1/ 2>&1 | grep '200 OK'; do echo waiting for pman; done" ]
4440
containers:
4541
- image: localhost:5000/fnndsc/pfcon:dev
4642
name: pfcon
4743
stdin: true
4844
tty: true
4945
ports:
5046
- containerPort: 5005
47+
# We need to mount a physical dir in the HOST onto the key store in pfcon. This dir
48+
# is given by the STOREBASE env variable substitution. The keystore can be specified
49+
# by the --storeBase flag during development.
50+
# Since pfcon spins off containers of its own it also needs to mount storeBase dir
51+
# (where it shares the data) into the spawned container. This directory is passed
52+
# in the STOREBASE env variable.
5153
env:
5254
- name: APPLICATION_MODE
5355
value: development
56+
- name: COMPUTE_VOLUME_TYPE
57+
- value: host
58+
- name: STOREBASE
59+
value: ${STOREBASE}
60+
- name: CONTAINER_ENV
61+
value: kubernetes
5462
command: ["python"]
5563
args: ["-m", "pfcon"]
5664
volumeMounts:
@@ -70,60 +78,3 @@ spec:
7078
- name: "pfcon-tests"
7179
hostPath:
7280
path: ${SOURCEDIR}/tests
73-
74-
---
75-
76-
apiVersion: v1
77-
kind: Service
78-
metadata:
79-
name: pman
80-
labels:
81-
app: pman
82-
env: production
83-
spec:
84-
selector:
85-
app: pman
86-
env: production
87-
ports:
88-
- port: 5010
89-
targetPort: 5010
90-
91-
---
92-
93-
apiVersion: apps/v1
94-
kind: Deployment
95-
metadata:
96-
name: pman
97-
labels:
98-
app: pman
99-
env: production
100-
spec:
101-
replicas: 1
102-
selector:
103-
matchLabels:
104-
app: pman
105-
env: production
106-
template:
107-
metadata:
108-
name: pman
109-
labels:
110-
app: pman
111-
env: production
112-
spec:
113-
containers:
114-
- image: fnndsc/pman
115-
name: pman
116-
ports:
117-
- containerPort: 5010
118-
# Since pman spins off containers of its own it needs to mount storeBase dir
119-
# (where pfcon shares the data) into the spawned container. This directory is
120-
# passed in the STOREBASE env variable.
121-
env:
122-
- name: STORAGE_TYPE
123-
value: host
124-
- name: SECRET_KEY
125-
value: "anysu^l=@pnsf!5piqz6!!5kdcdpo79y6jebbp+2244yjm*#+k"
126-
- name: STOREBASE
127-
value: ${STOREBASE}
128-
- name: CONTAINER_ENV
129-
value: kubernetes

kubernetes/pfcon_dev_innetwork.yaml

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ spec:
3838
env: development
3939
spec:
4040
initContainers:
41-
- name: init-pfcon
42-
image: busybox:1.32
43-
command: [ 'sh', '-c', "until wget --spider -S -T 2 http://pman:5010/api/v1/ 2>&1 | grep '200 OK'; do echo waiting for pman; done" ]
4441
- name: init-swift
4542
image: busybox:1.32
4643
command: [ "sh", "-c", "until wget --spider -S -T 2 http://swift:8080/info 2>&1 | grep '200 OK'; do echo waiting for Swift storage; sleep2; done" ]
@@ -58,6 +55,12 @@ spec:
5855
value: true
5956
- name: STORAGE_ENV
6057
value: swift
58+
- name: COMPUTE_VOLUME_TYPE
59+
- value: ${COMPUTE_VOLUME_TYPE}
60+
- name: STOREBASE
61+
value: ${STOREBASE}
62+
- name: CONTAINER_ENV
63+
value: kubernetes
6164
command: ["python"]
6265
args: ["-m", "pfcon"]
6366
volumeMounts:
@@ -80,63 +83,6 @@ spec:
8083

8184
---
8285

83-
apiVersion: v1
84-
kind: Service
85-
metadata:
86-
name: pman
87-
labels:
88-
app: pman
89-
env: production
90-
spec:
91-
selector:
92-
app: pman
93-
env: production
94-
ports:
95-
- port: 5010
96-
targetPort: 5010
97-
98-
---
99-
100-
apiVersion: apps/v1
101-
kind: Deployment
102-
metadata:
103-
name: pman
104-
labels:
105-
app: pman
106-
env: production
107-
spec:
108-
replicas: 1
109-
selector:
110-
matchLabels:
111-
app: pman
112-
env: production
113-
template:
114-
metadata:
115-
name: pman
116-
labels:
117-
app: pman
118-
env: production
119-
spec:
120-
containers:
121-
- image: fnndsc/pman
122-
name: pman
123-
ports:
124-
- containerPort: 5010
125-
# Since pman spins off containers of its own it needs to mount storeBase dir
126-
# (where pfcon shares the data) into the spawned container. This directory is
127-
# passed in the STOREBASE env variable.
128-
env:
129-
- name: STORAGE_TYPE
130-
value: host
131-
- name: SECRET_KEY
132-
value: "anysu^l=@pnsf!5piqz6!!5kdcdpo79y6jebbp+2244yjm*#+k"
133-
- name: STOREBASE
134-
value: ${STOREBASE}
135-
- name: CONTAINER_ENV
136-
value: kubernetes
137-
138-
---
139-
14086
apiVersion: v1
14187
kind: Service
14288
metadata:

kubernetes/pfcon_dev_innetwork_fs.yaml

Lines changed: 7 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ spec:
3737
app: pfcon
3838
env: development
3939
spec:
40-
initContainers:
41-
- name: init-pfcon
42-
image: busybox:1.32
43-
command: [ 'sh', '-c', "until wget --spider -S -T 2 http://pman:5010/api/v1/ 2>&1 | grep '200 OK'; do echo waiting for pman; done" ]
4440
containers:
4541
- image: localhost:5000/fnndsc/pfcon:dev
4642
name: pfcon
@@ -54,7 +50,13 @@ spec:
5450
- name: PFCON_INNETWORK
5551
value: true
5652
- name: STORAGE_ENV
57-
value: filesystem
53+
value: ${STORAGE_ENV}
54+
- name: COMPUTE_VOLUME_TYPE
55+
- value: ${COMPUTE_VOLUME_TYPE}
56+
- name: STOREBASE
57+
value: ${STOREBASE}
58+
- name: CONTAINER_ENV
59+
value: kubernetes
5860
command: ["python"]
5961
args: ["-m", "pfcon"]
6062
volumeMounts:
@@ -74,60 +76,3 @@ spec:
7476
- name: "pfcon-tests"
7577
hostPath:
7678
path: ${SOURCEDIR}/tests
77-
78-
---
79-
80-
apiVersion: v1
81-
kind: Service
82-
metadata:
83-
name: pman
84-
labels:
85-
app: pman
86-
env: production
87-
spec:
88-
selector:
89-
app: pman
90-
env: production
91-
ports:
92-
- port: 5010
93-
targetPort: 5010
94-
95-
---
96-
97-
apiVersion: apps/v1
98-
kind: Deployment
99-
metadata:
100-
name: pman
101-
labels:
102-
app: pman
103-
env: production
104-
spec:
105-
replicas: 1
106-
selector:
107-
matchLabels:
108-
app: pman
109-
env: production
110-
template:
111-
metadata:
112-
name: pman
113-
labels:
114-
app: pman
115-
env: production
116-
spec:
117-
containers:
118-
- image: fnndsc/pman
119-
name: pman
120-
ports:
121-
- containerPort: 5010
122-
# Since pman spins off containers of its own it needs to mount storeBase dir
123-
# (where pfcon shares the data) into the spawned container. This directory is
124-
# passed in the STOREBASE env variable.
125-
env:
126-
- name: STORAGE_TYPE
127-
value: host
128-
- name: SECRET_KEY
129-
value: "anysu^l=@pnsf!5piqz6!!5kdcdpo79y6jebbp+2244yjm*#+k"
130-
- name: STOREBASE
131-
value: ${STOREBASE}
132-
- name: CONTAINER_ENV
133-
value: kubernetes

0 commit comments

Comments
 (0)