Skip to content

Commit

Permalink
0.0.13 (opengs#160)
Browse files Browse the repository at this point in the history
* Fixed tag builder

* docker platform all

* Fixed builds

* Corrected some English spelling and grammar (opengs#137)

* Build for mac arm64

* Corrected some English spelling and grammar

Note I do not know Ukrainian, so hopefully this translation is accurate. Glory to Ukraine!

Co-authored-by: adam <adam@razniewski.eu>

* Too big package for arm dockerfile fix

* yarnrc

* Ansible autoupdate script (opengs#151)

* ref: change branch to dev for tests

* ref: change repo to dmpanch for tests

* ref: disabled proxy

* ref: changed branch to master

* ref: added --no-cache option to the docker-compose

* ref: added image name to the docker-compose

* ref: added step for removing old uashield images and containers

* ref: added -f key for approving images/containers removing

* ref: replaced image/container prune command with system prune

* ref: added check step if docker-compose installed
ref: added step for stopping and removing all containers/images before installation

* ref: removed build/no-cache/force-recreate keys

* ref: remove only uashield image/container insted of all before running

* ref: removed container removing step

* ref: changed repo URL to original

* ref: enable proxy

* ref: removed pip installatino, installing docker compose with curl

* 0.0.x (opengs#15)

* Improve docs with latest changes (opengs#134)

* Add varios scripts to improve ansible workflow

* Fix text

* Fix var

* Update settings

* Changed references of 0.0.x to master

* Start docker containers on reboot (opengs#128)

* Changed script to down and timeout only for one second, added restart always

* Added tool terraform-do-uashield (opengs#122)

* added tool terraform-do-uashield

* added readme

* Changed script to restart always and don't wait too much on docker compose down

Co-authored-by: adam <adam@razniewski.eu>

* Create README.MD

Co-authored-by: Denys Butenko <ua13dark@gmail.com>
Co-authored-by: vtinkerer <72277127+vtinkerer@users.noreply.github.com>
Co-authored-by: rdemachkovych <demachkovych@gmail.com>

* Added MacOS build

* Fixed tag builder

* docker platform all

* Fixed builds

* Corrected some English spelling and grammar (opengs#137)

* Build for mac arm64

* Corrected some English spelling and grammar

Note I do not know Ukrainian, so hopefully this translation is accurate. Glory to Ukraine!

Co-authored-by: adam <adam@razniewski.eu>

* Too big package for arm dockerfile fix

* yarnrc

Co-authored-by: Adam Raźniewski <adam@razniewski.eu>
Co-authored-by: Denys Butenko <ua13dark@gmail.com>
Co-authored-by: vtinkerer <72277127+vtinkerer@users.noreply.github.com>
Co-authored-by: rdemachkovych <demachkovych@gmail.com>
Co-authored-by: H. J. Poe <35583004+hjpoe@users.noreply.github.com>

* Feat/ansible autoupdate (opengs#16)

ref: changed uashield start from docker to docker-compose
ref: added repo autoupdate and image autobuild script

* Feat/ansible autoupdate (opengs#19)

* ref: changed uashield start from docker to docker-compose
* ref: added repo autoupdate and image autobuild script

Co-authored-by: Dmitriy Panchenko <dmitriy@bas-ip.com>
Co-authored-by: Adam Raźniewski <adam@razniewski.eu>
Co-authored-by: Denys Butenko <ua13dark@gmail.com>
Co-authored-by: vtinkerer <72277127+vtinkerer@users.noreply.github.com>
Co-authored-by: rdemachkovych <demachkovych@gmail.com>
Co-authored-by: H. J. Poe <35583004+hjpoe@users.noreply.github.com>

* Update package.json

Co-authored-by: H. J. Poe <35583004+hjpoe@users.noreply.github.com>
Co-authored-by: Dmitriy <dmpanch@users.noreply.github.com>
Co-authored-by: Dmitriy Panchenko <dmitriy@bas-ip.com>
Co-authored-by: Denys Butenko <ua13dark@gmail.com>
Co-authored-by: vtinkerer <72277127+vtinkerer@users.noreply.github.com>
Co-authored-by: rdemachkovych <demachkovych@gmail.com>
  • Loading branch information
7 people committed Mar 15, 2022
1 parent b1aece2 commit 8b8e939
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-docker-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
tags: |
ghcr.io/opengs/uashield:latest
4 changes: 2 additions & 2 deletions .github/workflows/github-actions-docker-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
tags: |
ghcr.io/opengs/uashield:${{ steps.extract_tag.outputs.tag }}
ghcr.io/opengs/uashield:${{ steps.extract_tag.outputs.tagv }}
ghcr.io/opengs/uashield:${{ steps.extract_tag_v.outputs.tagv }}
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
tags: |
ghcr.io/opengs/uashield:${{ steps.extract_branch.outputs.branch }}
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
network-timeout 600000
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM node:16.9.0-alpine AS builder
WORKDIR /code

COPY yarn.lock ./yarn.lock
COPY .yarnrc ./.yarnrc
COPY packageheadless.json ./package.json
# no need to --frozen-lockfile
# from docs - If yarn.lock is present and is enough to satisfy all the dependencies listed in package.json,
Expand Down
12 changes: 6 additions & 6 deletions README-en.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# UA Cyber SHIELD

*ALERT!!! We not supporting unlawful active attack or malware campaings that are causing technical harms. Use only for educational purposes. You can only try this prlatform on your own website!*
*ALERT!!! We not supporting unlawful active attacks or malware campaigns that are causing technical harm. Use only for educational purposes. You can only try this platform on your own website!*

*Дивись цю сторінку [українською](README.md)*

[![Release](https://img.shields.io/badge/Release-latest-blue)](https://github.com/opengs/uashield/releases/latest)

**The voluntary Ukrainian cyber defense system**
**The volunteer cyber defense system of Ukraine**

- Community: [Discord](https://discord.gg/7BfJ9JKQ98) [Telegram](https://t.me/uashield)
- Video Instruction [in Ukrainian](https://youtu.be/snTzpRt7a5k)
Expand All @@ -21,7 +21,7 @@

## How it works

Our voluntary defense center works are doing all the hard work: monitoring the targets, running the technical infrastructure, coordinating the attack targets, coordinating with the client applications, etc.
Our volunteer defense center does all the hard work: monitoring the targets, running the technical infrastructure, coordinating the attack targets, coordinating with the client applications, etc.
When the attack is performed, the application gets the data that it needs automatically.
The only thing you need to do is to install it.
Targets being attacked are changed automatically and are downloaded from the control center/server.
Expand Down Expand Up @@ -70,16 +70,16 @@ docker run -d ghcr.io/opengs/uashield:master 512 true
[![Try in PWD](https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/opengs/uashield/master/pwd-docker-compose.yml)

## Donations
Donations will be used to fund our operations:
Donations will be used exclusively to fund our operations:
1. Expenses on constantly buying new proxy servers
2. From time to time buying servers for new infastructure

When we will win the war and will be peace in Ukraine, funds will be transfered to voluntary associations to help victims of this war.
When we win the war and there is peace in Ukraine, funds will be transfered to voluntary associations to help victims of this war.

You can help us using:
- BTC: 11wxDarouPfY6P3misLvFuJ8k8oWhd4qb

Also, here are some variants if you want to help developers with some cofee. So we can continue to skip work and keep invest time in project all nights:
Also, here are some variants if you want to help developers with some coffee, so we can continue to skip work and keep investing time in the project all nights:
- BTC: 12CcLYn6zrBcnmvK5fRSAQcJre5jknyTxH

We will add more variants in future :)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shield",
"version": "0.0.12",
"version": "0.0.13",
"description": "Cyber security shield",
"productName": "UA Cyber SHIELD",
"author": "Mykola Zhyhallo <mzhyhall@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion tools/ansible/hosts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[servers]
10.10.10.10
10.10.10.11
10.10.10.11
57 changes: 24 additions & 33 deletions tools/ansible/roles/uashield/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,43 @@
---
- name: Check if repo is exist
stat:
path: "{{uashield_work_dir}}"
failed_when: false
changed_when: false
register: check_uashield_repo

- name: Clone repo
- name: Clone uashield repo
git:
repo: "{{uashield_git_url}}"
dest: "{{uashield_work_dir}}"
accept_hostkey: true
force: true
version: "master"
when: not check_uashield_repo.stat.exists

- name: Pull Latest Changes
shell: "git pull"
- name: Stop all containers
shell: "docker-compose down"
args:
chdir: "{{uashield_work_dir}}"
when: check_uashield_repo.stat.exists

- name: Get Running Docker Containers
shell: "docker ps -aq"
register: docker_info

- name: Stop Running Docker Containers
shell: "docker stop $(docker ps -aq)"
when: docker_info.stdout

- name: Remove Docker Containers
shell: "docker rm $(docker ps -aq)"
when: docker_info.stdout

- name: Remove Old Docker Image
- name: Remove old uashield images
shell: "docker rmi -f uashield"

- name: Build Docker Image
shell: "docker build . -t uashield"
- name: Run uashield
shell: "docker-compose up -d"
args:
chdir: "{{uashield_work_dir}}"

- name: Run Instance
shell: "docker run -d uashield {{ uashield_threads }} {{ uashield_proxy }}"

- name: Check Docker is started
command: "docker ps"
- name: Check docker started
shell: "docker ps"
args:
chdir: "{{uashield_work_dir}}"
register: output

- ansible.builtin.debug:
var: output.stdout_lines
var: output

- name: Chmod bash script for image update
shell: "chmod +x /root/uashield/tools/ansible/update-build.sh"

- name: Remove /root/cronjob file if exists
shell: "rm /root/cronjob"
ignore_errors: yes

- name: Add every 30 minutes image update as a cronjob
shell: "sudo echo '*/3 * * * * /root/uashield/tools/ansible/update-build.sh' >> /root/cronjob"

- name: Add every reboot image update as a cronjob
shell: "sudo echo '@reboot /root/uashield/tools/ansible/update-build.sh' >> /root/cronjob && crontab /root/cronjob"
18 changes: 18 additions & 0 deletions tools/ansible/update-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

cd /root/uashield/

if git checkout master &&
git fetch origin master &&
[ `git rev-list HEAD...origin/master --count` != 0 ] &&
git merge origin/master
then
echo 'Updated!'
sudo chmod +x /root/uashield/tools/ansible/update-build.sh
sudo docker-compose down -t 1
sudo docker rmi -f uashield
sudo docker-compose up -d
docker ps
else
echo 'Not updated.'
fi
2 changes: 0 additions & 2 deletions tools/ansible/vars/vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
#Docker

docker_version: 5.0.3
docker_install_compose: true
docker_users: []
docker_pip_executable: pip3

#Uashield

Expand Down

0 comments on commit 8b8e939

Please sign in to comment.