Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singular ClamAV instance #2660

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
99531e7
removed clamav from being deployed unless in production. Pointed AV S…
Aug 14, 2023
43527f5
added network policy to connect to prod clamAV
Aug 23, 2023
58cf0d1
use prod clam av in cloudgov.py too
Aug 25, 2023
4a55e18
Merge branch 'develop' into 2429/single-clamav
Aug 25, 2023
8c98ce2
fixing 'f-string is missing placeholders' now that we are hardcoding …
Aug 25, 2023
dab98ab
removed quotes from add-network-policy command when interpolation not…
Aug 28, 2023
fd2d8a0
removed add-network-policy from deploy-backend.sh and added documenta…
Aug 29, 2023
9131789
add nginx router and manifest
raftmsohani Sep 6, 2023
648e3a5
Merge branch 'develop' into 2429/single-clamav
Sep 6, 2023
f5afac6
Merge branch '2429/single-clamav' of github.com:raft-tech/TANF-app in…
Sep 6, 2023
a32ead7
cleaned up
Sep 6, 2023
b55aa57
Update README for CLAMAV
raftmsohani Sep 11, 2023
d7a9bee
Merge branch '2429/single-clamav' of https://github.com/raft-tech/TAN…
raftmsohani Sep 11, 2023
b005aa0
updated README file with deployment commands
raftmsohani Sep 19, 2023
71d77d4
added network policy for backend to clamav router
raftmsohani Sep 19, 2023
35048bb
updated boundry diagram
raftmsohani Sep 19, 2023
d31f037
updated boundry diagram
raftmsohani Sep 19, 2023
8ea10f1
Removed AV_SCAN url from cloud.gov settings file
raftmsohani Sep 19, 2023
e14fd82
update setting environment variable
raftmsohani Sep 19, 2023
ca4c5f1
refactored circle ci for static clam av vars since only one server no…
Sep 19, 2023
73677dd
Merge branch '2429/single-clamav' of github.com:raft-tech/TANF-app in…
Sep 19, 2023
a2b5089
needs env_var_name, not string for login-cloud-dot-gov
Sep 20, 2023
38d8c0a
revert back to env_var_name type for downstream login_cloud_dot_gov c…
Sep 21, 2023
006d60d
added prod prefix back in
Sep 21, 2023
acf6814
Merge branch 'develop' into 2429/single-clamav
Sep 22, 2023
9b72df8
readd AV_SCAN_URL
Sep 22, 2023
ee6c265
changed the inline comment in common.py settings
raftmsohani Sep 24, 2023
d695c41
Merge branch '2429/single-clamav' of https://github.com/raft-tech/TAN…
raftmsohani Sep 24, 2023
3c6467e
README file rewrite
raftmsohani Sep 25, 2023
19ee517
added note
Sep 25, 2023
79c1f85
Merge branch '2429/single-clamav' of github.com:raft-tech/TANF-app in…
Sep 25, 2023
1f39173
Merge branch 'develop' into 2429/single-clamav
raftmsohani Sep 28, 2023
714bbc8
Merge branch 'develop' into 2429/single-clamav
raftmsohani Sep 28, 2023
16ab89f
readded clam av nginx router url to manifest and setting network poli…
Sep 29, 2023
9e2c437
updated for using backend to set ENV for ClamAV URL.
Sep 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions .circleci/deployment/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,43 @@
backend-appname: <<parameters.backend-appname>>
frontend-appname: <<parameters.frontend-appname>>
cf-space: <<parameters.cf-space>>
- deploy-clamav:
backend-appname: <<parameters.backend-appname>>
cf-org: <<parameters.cf-org>>
cf-space: <<parameters.cf-space>>
- deploy-frontend:
environment: <<parameters.environment>>
backend-appname: <<parameters.backend-appname>>
frontend-appname: <<parameters.frontend-appname>>
cf-space: <<parameters.cf-space>>

clamav-cloud-dot-gov:
George-Hudson marked this conversation as resolved.
Show resolved Hide resolved
parameters:
backend-appname:
default: tdp-backend
type: string
cf-password:
default: CF_PASSWORD_DEV
type: env_var_name
cf-org:
default: CF_ORG
type: env_var_name
cf-space:
default: tanf-dev
type: string
cf-username:
default: CF_USERNAME_DEV
type: env_var_name
steps:
- checkout
- sudo-check
- cf-check
- login-cloud-dot-gov:
cf-password: <<parameters.cf-password>>
cf-org: <<parameters.cf-org>>
cf-space: <<parameters.cf-space>>
cf-username: <<parameters.cf-username>>
- deploy-clamav:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: check-ahead, see if tdp-clamav-nginx exists, if not, push clamav-router/manifest.yml. We can do so in deploy-clamav command on L115.

backend-appname: <<parameters.backend-appname>>
cf-org: <<parameters.cf-org>>
cf-space: <<parameters.cf-space>>

deploy-backend:
parameters:
backend-appname:
Expand Down
9 changes: 9 additions & 0 deletions .circleci/deployment/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,12 @@
cf-password: CF_PASSWORD_PROD
cf-space: tanf-prod
cf-username: CF_USERNAME_PROD
deploy-clamav:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name conflict with the command is confusing. Can we rename this? Also, to match the rest of the file could you insert an empty line between this and the above job deploy-production?

executor: docker-executor
working_directory: ~/tdp-deploy
steps:
- clamav-cloud-dot-gov:
backend-appname: tdp-backend-prod
cf-password: CF_PASSWORD_PROD
cf-space: tanf-prod
cf-username: CF_USERNAME_PROD
7 changes: 7 additions & 0 deletions .circleci/deployment/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@
branches:
only:
- master
- deploy-clamav:
requires:
- deploy-infrastructure-production
filters:
branches:
only:
- master
- make_erd: # from ../util folder
filters:
branches:
Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ applications:
docker:
image: ((docker-backend))
env:
AV_SCAN_URL: http://((cf-space))-clamav-rest.apps.internal:9000/scan
George-Hudson marked this conversation as resolved.
Show resolved Hide resolved
AV_SCAN_URL: http://tanf-prod-clamav-rest.apps.internal:9000/scan
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we only need this env var for local/circleci? If deployed, we have it hard-coded in settings/cloudgov.py now. Do we need to adjust deploy_backend.shto no longer set that env var?

Copy link

@raftmsohani raftmsohani Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No we don't need this. we will need to change it for non-prod instances to :

AV_SCAN_URL: https://tdp-clamav-nginx-((env)).apps.internal:9000/scan