installation instructino added

This commit is contained in:
ahmadbilalkhalid 2019-11-20 14:46:36 +05:00
parent ad311bc0e2
commit 281e391ba6
4 changed files with 70 additions and 21 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
.vscode
__pycache__
.env
client.py
client.py
.idea/

View File

@ -15,6 +15,7 @@ python-decouple = "*"
requests = "*"
pyotp = "*"
pytest = "*"
click = "*"
[requires]
python_version = "3.5"

32
Pipfile.lock generated
View File

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "d2909a9d9dc49af377037be55265460f701aa85e2d601cc90d292275ea01fba6"
"sha256": "89ea13357d1b32d82ca1b6f1b1e6530825c132ccc5010004e1cfea1a2466b90a"
},
"pipfile-spec": 6,
"requires": {
@ -23,13 +23,6 @@
],
"version": "==8.0.0"
},
"atomicwrites": {
"hashes": [
"sha256:03472c30eb2c5d1ba9227e4c2ca66ab8287fbfbbda3888aa93dc2e28fc6811b4",
"sha256:75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6"
],
"version": "==1.3.0"
},
"attrs": {
"hashes": [
"sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c",
@ -56,6 +49,7 @@
"sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13",
"sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"
],
"index": "pypi",
"version": "==7.0"
},
"etcd3": {
@ -259,25 +253,25 @@
},
"pyparsing": {
"hashes": [
"sha256:4acadc9a2b96c19fe00932a38ca63e601180c39a189a696abce1eaab641447e1",
"sha256:61b5ed888beab19ddccab3478910e2076a6b5a0295dffc43021890e136edf764"
"sha256:20f995ecd72f2a1f4bf6b072b63b22e2eb457836601e76d6e5dfcd75436acc1f",
"sha256:4ca62001be367f01bd3e92ecbb79070272a9d4964dce6a48a82ff0b8bc7e683a"
],
"version": "==2.4.4"
"version": "==2.4.5"
},
"pytest": {
"hashes": [
"sha256:27abc3fef618a01bebb1f0d6d303d2816a99aa87a5968ebc32fe971be91eb1e6",
"sha256:58cee9e09242937e136dbb3dab466116ba20d6b7828c7620f23947f37eb4dae4"
"sha256:1897d74f60a5d8be02e06d708b41bf2445da2ee777066bd68edf14474fc201eb",
"sha256:f6a567e20c04259d41adce9a360bd8991e6aa29dd9695c5e6bd25a9779272673"
],
"index": "pypi",
"version": "==5.2.2"
"version": "==5.3.0"
},
"python-decouple": {
"hashes": [
"sha256:1317df14b43efee4337a4aa02914bf004f010cd56d6c4bd894e6474ec8c4fe2d"
"sha256:55c546b85b0c47a15a47a4312d451a437f7344a9be3e001660bccd93b637de95"
],
"index": "pypi",
"version": "==3.1"
"version": "==3.3"
},
"pytz": {
"hashes": [
@ -310,10 +304,10 @@
},
"urllib3": {
"hashes": [
"sha256:3de946ffbed6e6746608990594d08faac602528ac7015ac28d33cee6a45b7398",
"sha256:9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86"
"sha256:a8a318824cc77d1fd4b2bec2ded92646630d7fe8619497b142c84a9e6f5a7293",
"sha256:f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745"
],
"version": "==1.25.6"
"version": "==1.25.7"
},
"wcwidth": {
"hashes": [

View File

@ -1,5 +1,4 @@
# uotp
### Aims to replace ungleich-otp
**uotp** is a full blown authentication and authorisation service
made for micro services.
@ -13,3 +12,57 @@ uotp has been created and is maintained by ungleich.
* Flask
* PyOTP
* Etcd
## Installation
### Alpine
```shell
# Update and Upgrade
cat > /etc/apk/repositories << EOF
https://mirror.ungleich.ch/mirror/packages/alpine/edge/main
https://mirror.ungleich.ch/mirror/packages/alpine/edge/community
https://mirror.ungleich.ch/mirror/packages/alpine/edge/testing
EOF
apk update
apk upgrade
# Install Dependencies
apk add python3 git etcd etcd-ctl py3-grpcio
pip3 install pipenv
# Start etcd
# etcd don't start using `service etcd start` as its package have some issue
start-stop-daemon -b etcd
# Clone Repo
git clone https://code.ungleich.ch/ungleich-public/uotp.git
cd uotp
pipenv --three --site-packages
pipenv install
cp .env.sample .env
pipenv run python app.py
```
### Arch
```shell
# Install Dependencies
pacman -S python3 git
pamac build etcd
pip3 install pipenv
# Start etcd
systemctl start etcd
# Clone Repo
git clone https://code.ungleich.ch/ungleich-public/uotp.git
cd uotp
pipenv --three
pipenv install
cp .env.sample .env
pipenv run python app.py
```
By default, it would run at port `8000`.