зеркало из https://github.com/mozilla/MozDef.git
Merge branch 'infosec_workweek' of github.com:mozilla/MozDef into infosec_workweek
This commit is contained in:
Коммит
3f8925060a
35
Makefile
35
Makefile
|
@ -19,42 +19,47 @@
|
|||
# make multiple-rebuild-tests - build, stop/rm and run new mozdef environment for tests in multiple containers
|
||||
# make multiple-rebuild-tests-new - build, stop/rm and run new mozdef environment for tests in multiple containers
|
||||
|
||||
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
NAME=mozdef
|
||||
VERSION=0.1
|
||||
|
||||
multiple-run:
|
||||
all:
|
||||
@echo 'Available make targets:'
|
||||
@grep '^[^#[:space:]].*:' Makefile
|
||||
|
||||
run: build
|
||||
docker-compose -f docker/compose/docker-compose.yml -p $(NAME) up -d
|
||||
|
||||
multiple-run-tests:
|
||||
run-tests: build-tests
|
||||
docker-compose -f docker/compose/docker-compose-tests.yml -p $(NAME) up -d --remove-orphans
|
||||
|
||||
multiple-build:
|
||||
build:
|
||||
docker-compose -f docker/compose/docker-compose.yml -p $(NAME) build
|
||||
|
||||
multiple-build-tests:
|
||||
build-tests:
|
||||
docker-compose -f docker/compose/docker-compose-tests.yml -p $(NAME) build
|
||||
|
||||
multiple-build-no-cache:
|
||||
build-no-cache:
|
||||
docker-compose -f docker/compose/docker-compose.yml -p $(NAME) build --no-cache
|
||||
|
||||
multiple-stop:
|
||||
stop:
|
||||
down:
|
||||
-docker-compose -f docker/compose/docker-compose.yml -p $(NAME) stop
|
||||
|
||||
multiple-stop-tests:
|
||||
stop-tests:
|
||||
down-tests:
|
||||
-docker-compose -f docker/compose/docker-compose-tests.yml -p $(NAME) stop
|
||||
|
||||
multiple-rm:
|
||||
rm:
|
||||
-docker-compose -f docker/compose/docker-compose.yml -p $(NAME) down -v --remove-orphans
|
||||
|
||||
multiple-rm-tests:
|
||||
rm-tests:
|
||||
-docker-compose -f docker/compose/docker-compose-tests.yml -p $(NAME) down -v --remove-orphans
|
||||
|
||||
multiple-rebuild: multiple-build multiple-stop multiple-run
|
||||
# Shorthands
|
||||
rebuild: multiple-build multiple-stop multiple-run
|
||||
|
||||
multiple-rebuild-new: multiple-build multiple-rm multiple-run
|
||||
rebuild-tests: multiple-build-tests multiple-stop-tests multiple-run-tests
|
||||
|
||||
multiple-rebuild-tests: multiple-build-tests multiple-stop-tests multiple-run-tests
|
||||
|
||||
multiple-rebuild-tests-new: multiple-build-tests multiple-rm-tests multiple-run-tests
|
||||
|
||||
.PHONY: multiple-build multiple-run multiple-stop multiple-rebuild
|
||||
.PHONY: build build-tests rebuild rebuild-tests run run-tests stop down clean
|
||||
|
|
|
@ -1,27 +1,30 @@
|
|||
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
IMAGE_NAME := mozdef-deployment
|
||||
S3_INFOSEC_URI := s3://mozdef.infosec.mozilla.org/cf
|
||||
S3_STACK_URI := https://s3-us-west-2.amazonaws.com/cf/nested-stack.yml
|
||||
|
||||
all:
|
||||
@echo 'Available make targets:'
|
||||
@grep '^[^#[:space:]].*:' Makefile
|
||||
|
||||
docker-build:
|
||||
docker build -t mozdef-deployment:latest .
|
||||
docker build -t $(IMAGE_NAME):latest .
|
||||
|
||||
deploy-shell:
|
||||
docker run -ti -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef mozdef-deployment:latest /bin/bash
|
||||
docker run -ti -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef $(IMAGE_NAME):latest /bin/bash
|
||||
|
||||
packer-build:
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef mozdef-deployment:latest bash -c 'cd packer && packer build packer.json'
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef $(IMAGE_NAME):latest bash -c "cd packer && packer build packer.json"
|
||||
|
||||
deploy-nested-cloudformation:
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef mozdef-deployment:latest bash -c 'ansible-playbook -c local ansible/update-ami-metadata.yml'
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef mozdef-deployment:latest bash -c 'aws s3 sync /opt/mozdef/ansible/files/stacks/ s3://mozdef.infosec.mozilla.org/cf/ --acl public-read'
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef $(IMAGE_NAME):latest bash -c "ansible-playbook -c local ansible/update-ami-metadata.yml"
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef $(IMAGE_NAME):latest bash -c "aws s3 sync /opt/mozdef/ansible/files/stacks/ $(S3_INFOSEC_URI) --acl public-read"
|
||||
|
||||
test-nested-stack:
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef mozdef-deployment:latest bash -c 'ansible-playbook -c local ansible/update-ami-metadata.yml'
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef mozdef-deployment:latest bash -c 'aws s3 sync /opt/mozdef/ansible/files/stacks/ s3://mozdef.infosec.mozilla.org/cf/ --acl public-read'
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef mozdef-deployment:latest bash -c 'aws s3 cp /opt/mozdef/cloudformation/nested-stack.yml s3://mozdef.infosec.mozilla.org/cf/nested-stack.yml --acl public-read'
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef mozdef-deployment:latest bash -c 'aws cloudformation update-stack --stack-name mozdef-nested --template-url https://s3-us-west-2.amazonaws.com/cf/nested-stack.yml'
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef $(IMAGE_NAME):latest bash -c "ansible-playbook -c local ansible/update-ami-metadata.yml"
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef $(IMAGE_NAME):latest bash -c "aws s3 sync /opt/mozdef/ansible/files/stacks/ $(S3_INFOSEC_URI) --acl public-read"
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef $(IMAGE_NAME):latest bash -c "aws s3 cp /opt/mozdef/cloudformation/nested-stack.yml $(S3_INFOSEC_URI)/nested-stack.yml --acl public-read"
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef $(IMAGE_NAME):latest bash -c "aws cloudformation update-stack --stack-name mozdef-nested --template-url $(S3_STACK_URI)"
|
||||
|
||||
stack-status:
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef mozdef-deployment:latest bash -c 'aws cloudformation describe-stacks --stack-name mozdef-nested'
|
||||
docker run -v ~/.aws:/root/.aws -v `pwd`:/opt/mozdef $(IMAGE_NAME):latest bash -c "aws cloudformation describe-stacks --stack-name mozdef-nested"
|
||||
|
|
|
@ -472,7 +472,7 @@
|
|||
"jquery": {
|
||||
"version": "1.12.3",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-1.12.3.tgz",
|
||||
"integrity": "sha1-nMNM5HgNTOuQxEMo8HEGTwGWDBg="
|
||||
"integrity": "sha512-FzM42/Ew+Hb8ha2OlhHRBLgWIZS32gZ0+NvWTf+ZvVvGaIlJkOiXQyb7VBjv4L6fJfmTrRf3EsAmbfsHDhfemw=="
|
||||
},
|
||||
"jquery-ui": {
|
||||
"version": "1.12.1",
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"@babel/runtime": "7.0.0-beta.55",
|
||||
"bcrypt": "^3.0.1",
|
||||
"dc": "^2.1.10",
|
||||
"jquery": "^1.12.1",
|
||||
"jquery": "^1.12.3",
|
||||
"jquery-ui": "^1.12.1",
|
||||
"meteor-node-stubs": "^0.4.1",
|
||||
"pivottable": "^2.22.0",
|
||||
|
|
Загрузка…
Ссылка в новой задаче