From ea63c86bf8358c3e3805539738c51a89f520d6b9 Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Wed, 30 Nov 2022 02:20:48 +0100 Subject: [PATCH] Refactoring --- Makefile | 7 + deploy/certs/add-cert-to-keystore.sh | 8 + deploy/certs/basket-svc/client.cert | 25 +++ deploy/certs/basket-svc/client.key | 28 +++ deploy/certs/basket-svc/server.cert | 24 ++ deploy/certs/basket-svc/server.key | 28 +++ deploy/certs/catalog-svc/client.cert | 25 +++ deploy/certs/catalog-svc/client.key | 28 +++ deploy/certs/catalog-svc/server.cert | 24 ++ deploy/certs/catalog-svc/server.key | 28 +++ deploy/certs/identity-svc/client.cert | 25 +++ deploy/certs/identity-svc/client.key | 28 +++ deploy/certs/identity-svc/server.cert | 24 ++ deploy/certs/identity-svc/server.key | 28 +++ deploy/certs/make-ca.sh | 36 +++ deploy/certs/make-cert.sh | 60 +++++ deploy/certs/order-svc/client.cert | 25 +++ deploy/certs/order-svc/client.key | 28 +++ deploy/certs/order-svc/server.cert | 24 ++ deploy/certs/order-svc/server.key | 28 +++ deploy/certs/postgres-svc/client.cert | 25 +++ deploy/certs/postgres-svc/client.key | 28 +++ deploy/certs/postgres-svc/server.cert | 24 ++ deploy/certs/postgres-svc/server.key | 28 +++ deploy/egommerce-stack.dev.yml | 129 ++++++++++- deploy/egommerce-stack.yml | 259 +++++++++++++++++++--- deploy/etc/consul/server.json | 14 ++ deploy/{stack-start.sh => start-stack.sh} | 3 +- 28 files changed, 1005 insertions(+), 36 deletions(-) create mode 100644 Makefile create mode 100644 deploy/certs/add-cert-to-keystore.sh create mode 100644 deploy/certs/basket-svc/client.cert create mode 100644 deploy/certs/basket-svc/client.key create mode 100644 deploy/certs/basket-svc/server.cert create mode 100644 deploy/certs/basket-svc/server.key create mode 100644 deploy/certs/catalog-svc/client.cert create mode 100644 deploy/certs/catalog-svc/client.key create mode 100644 deploy/certs/catalog-svc/server.cert create mode 100644 deploy/certs/catalog-svc/server.key create mode 100644 deploy/certs/identity-svc/client.cert create mode 100644 deploy/certs/identity-svc/client.key create mode 100644 deploy/certs/identity-svc/server.cert create mode 100644 deploy/certs/identity-svc/server.key create mode 100644 deploy/certs/make-ca.sh create mode 100644 deploy/certs/make-cert.sh create mode 100644 deploy/certs/order-svc/client.cert create mode 100644 deploy/certs/order-svc/client.key create mode 100644 deploy/certs/order-svc/server.cert create mode 100644 deploy/certs/order-svc/server.key create mode 100644 deploy/certs/postgres-svc/client.cert create mode 100644 deploy/certs/postgres-svc/client.key create mode 100644 deploy/certs/postgres-svc/server.cert create mode 100644 deploy/certs/postgres-svc/server.key create mode 100644 deploy/etc/consul/server.json rename deploy/{stack-start.sh => start-stack.sh} (89%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f592a66 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +DEPLOY_DIR := ./deploy + +up: + - sh ${DEPLOY_DIR}/start-stack.sh + +down: + - docker stack egommerce diff --git a/deploy/certs/add-cert-to-keystore.sh b/deploy/certs/add-cert-to-keystore.sh new file mode 100644 index 0000000..cb3b7af --- /dev/null +++ b/deploy/certs/add-cert-to-keystore.sh @@ -0,0 +1,8 @@ +# #!/bin/sh + +# if [ -z "$SERVICE_NAME" ]; then echo "set SERVICE_NAME var"; exit 1; fi +# if [ -z "$TARGET_SERVICE_NAME" ]; then echo "set TARGET_SERVICE_NAME var"; exit 1; fi +# PASSWORD=V3ryS3cr3tP4ssw0rd + +# # Add cdert to keystore($TARGET_SERVICE_NAME) +# keytool -importcert -v -alias $SERVICE_NAME -storetype PKCS12 -file "$SERVICE_NAME/$SERVICE_NAME.pem" -keystore "$TARGET_SERVICE_NAME/keystore.p12" -keypass $PASSWORD -storepass $PASSWORD diff --git a/deploy/certs/basket-svc/client.cert b/deploy/certs/basket-svc/client.cert new file mode 100644 index 0000000..6e78424 --- /dev/null +++ b/deploy/certs/basket-svc/client.cert @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEPjCCAyagAwIBA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XBpLmVnb21tZXJjZS5sb2NhbDAN +BgkqhkiG9w0BAQsFAAOCAQEAfsHGRub8wBBzmOD8TeaEMNLV17d9Qn0PYWVu8ufN +xkIlayepb1HhG1Slo0cJIR7gpIrXm8/J6ghjX4wkLBEOXMSu5GLbRwUdQo0lXEVb +DobGukd7wgK/52/NHkhw00AorWI0SgYvl12CVpkjhAO3Zb3W/0MdoOn+TfePvGJR +L03a9hYRFTCf8wXAbIv/Cu9MlVeBPx1dcOIhhUr6165w89RZIfLH5tSxWAFAcnup +wzGWlsk7Ya/gCmsPWPjZPDBQwtr/8Ar2tTlatfk4I+NlfDlzStE2fo8O58spYEFX +ilhuWB84g880AXShqKFgY5gMKbcDUuFYJ9mTu+DjLLXpEA== +-----END CERTIFICATE----- diff --git a/deploy/certs/basket-svc/client.key b/deploy/certs/basket-svc/client.key new file mode 100644 index 0000000..88e16af --- /dev/null +++ b/deploy/certs/basket-svc/client.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDRZU96lT0CrLZX +rp5UznnQ96Hu7VvF+m0Ysl4WIaDFMRDGz8Hwl0IQv+U3HH0GQEHRLDK/LTByIh1u +lCO/5w73J6U9WtXpiXnfYjiW5nf8Z0p4u7nlojb/7opP7Tg5cny0cNlX3vmfOh65 +x2vuJHdQa8bnvOFZKRYFFRZbL0jNHGpMij0fOhGVMnCDdnBAxnC9K7Obpj7LIh/i +gVShxtgxu/U63kmigeIaxfP7gxmDPByNx4jBn/7OdUvm6tfc9G+3GhxBECChtAl9 +4prnZ3TGQMKWd3ATBAZxQRRDzU7vlYf8jhGCptI420K03/eRn09k8qqbETKlxZU8 +i801FMFlAgMBAAECggEAFPSpYVh1qGKeBgTm+hBG3yulNFrjTBstl2LkaR0Y8Jsi +NW9d1qTgmvoFZ8BNX9aG77bXZkwQtN9mqCYhtMccN45rakpArbRRMtKq3Kk4eVVh +/da1uj5DeFYI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2nUk8ZC/pWSBv+VoU +6XhQ+xV0X/A+l6uK4gxU+jY= +-----END PRIVATE KEY----- diff --git a/deploy/certs/basket-svc/server.cert b/deploy/certs/basket-svc/server.cert new file mode 100644 index 0000000..8e54eba --- /dev/null +++ b/deploy/certs/basket-svc/server.cert @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEDjCCAvagAwIBAgIUD3d+7OrJ5w0lusxLMZC0u4Zaf5owDQYJKoZIhvcNAQEL +BQAwgYoxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0 +b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJjZTEMMAoGA1UECwwDZGV2MRMwEQYDVQQD +DApiYXNrZXQtc3ZjMSEwHwYJKoZIhvcNAQkBFhJyb290QGVnb21tZXJjZS5kZXYw +HhcNMjIxMTI1MDMxNjU1WhcNMjMxMTI1MDMxNjU1WjCBijELMAkGA1UEBhMCUEwx +DjAMBgNVBAgMBVNsYXNrMREwDwYDVQQHDAhLYXRvd2ljZTESMBAGA1UECgwJZWdv +bW1lcmNlMQwwCgYDVQQLDANkZXYxEzARBgNVBAMMCmJhc2tldC1zdmMxITAfBgkq +hkiG9w0BCQEWEnJvb3RAZWdvbW1lcmNlLmRldjCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBALwI3dYP5tFrgjHm14Nk37vB/JpRC0EHFq0Ik0gbbqe10ikW +CnU9xqtyh9dGDrBWcJCL4VJZHV1GurTURZZo1nExArrRqtWZY+tmQRLfg5AV7UQO +7KVzhdfFltiWibBjVO5cuevLib1O5YU27ZjRB2H2TBjaWS5Czs2+Ee6vZafXrGwZ +u7l7JIeEgz9mVglANOkjavwdvO0l18aGDHTQc1QYpCI8ss3TOLmBCSTN7wESF8ki +RGAsTDp0AVCm6VU/3850UZb6sfczqTen3cn3HZejTicCwufSPKdR3UWl4ZVrMjuq +zcyD/sy5R2TefW3Mn0q0DAysnxPzeIfCgjtiGE0CAwEAAaNqMGgwHQYDVR0OBBYE +FMfsBu2LXupzmY+My7BFUKLByAv1MB8GA1UdIwQYMBaAFMfsBu2LXupzmY+My7BF +UKLByAv1MA8GA1UdEwEB/wQFMAMBAf8wFQYDVR0RBA4wDIIKYmFza2V0LXN2YzAN +BgkqhkiG9w0BAQsFAAOCAQEAkm0dM03mQzPtxfTqidPquMHrmCq/AvKCfYdpErx9 +5nw5W2Gf8vbgFUpfjswe1TTZtur4c37Ojv1FIkmgsMXKv2pBOk4uiQE3N3SvtxXz +ZzQvZx+Spl/5BSVPOpun3RwgSMCAiIrVVtfSBhjSPxCosBGM3MqOI6GpsUeO6El7 +ou5R6iX7whLEwQSes17oZUsfy4Jw2KtowGc5gr3baDJXP6CkJglpNAHofYMDphFU +wd1wVc+iX99t3fKgRs91ho1kdgwGkFcujGhiv8dJSsybUcQPbROtAKit8+9acH08 +cuTlGTDFFw8R+zkHfSDxXAjChI3yoAAiPLliNIqyrZD8TQ== +-----END CERTIFICATE----- diff --git a/deploy/certs/basket-svc/server.key b/deploy/certs/basket-svc/server.key new file mode 100644 index 0000000..927a73f --- /dev/null +++ b/deploy/certs/basket-svc/server.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC8CN3WD+bRa4Ix +5teDZN+7wfyaUQtBBxatCJNIG26ntdIpFgp1PcarcofXRg6wVnCQi+FSWR1dRrq0 +1EWWaNZxMQK60arVmWPrZkES34OQFe1EDuylc4XXxZbYlomwY1TuXLnry4m9TuWF +Nu2Y0Qdh9kwY2lkuQs7NvhHur2Wn16xsGbu5eySHhIM/ZlYJQDTpI2r8HbztJdfG +hgx00HNUGKQiPLLN0zi5gQkkze8BEhfJIkRgLEw6dAFQpulVP9/OdFGW+rH3M6k3 +p93J9x2Xo04nAsLn0jynUd1FpeGVazI7qs3Mg/7MuUdk3n1tzJ9KtAwMrJ8T83iH +woI7YhhNAg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rMdRuMBvsMCfvBsHxw +FJKxWuUI66UWfpsfS8UTcU1hW6o7rT/Yqbyp/NsYjFAvGVQ9iE9SEulbUojHgyF5 +oj+mI188r6ub30vEttzRtkfBMyyohI/asT4imchQfItjIWFjLqRJVS3hZhHzkcYr +9fhQI53HXpva0T49Luycyg== +-----END PRIVATE KEY----- diff --git a/deploy/certs/catalog-svc/client.cert b/deploy/certs/catalog-svc/client.cert new file mode 100644 index 0000000..bda5227 --- /dev/null +++ b/deploy/certs/catalog-svc/client.cert @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEQTCCAymgAwIBAgIUZluuWCa5dtAgTvolk7IRjBapGTEwDQYJKoZIhvcNAQEL +BQAwgZsxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0 +b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJjZTEMMAoGA1UECwwDZGV2MSQwIgYDVQQD +DBtjYXRhbG9nLmFwaS5lZ29tbWVyY2UubG9jYWwxITAfBgkqhkiG9w0BCQEWEnJv +b3RAZWdvbW1lcmNlLmRldjAeFw0yMjExMjUwMzU4NDdaFw0yMzExMjUwMzU4NDda +MIGbMQswCQYDVQQGEwJQTDEOMAwGA1UECAwFU2xhc2sxETAPBgNVBAcMCEthdG93 +aWNlMRIwEAYDVQQKDAllZ29tbWVyY2UxDDAKBgNVBAsMA2RldjEkMCIGA1UEAwwb +Y2F0YWxvZy5hcGkuZWdvbW1lcmNlLmxvY2FsMSEwHwYJKoZIhvcNAQkBFhJyb290 +QGVnb21tZXJjZS5kZXYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9 +PsaReVh3dNN2KSaPFAI8FLraToXVuycU5K5H8n10VkFevNZlgjBL2KmamUqEzn50 +fMsc3cigCx1RMFnXNA6kUwCGJ1DRPCn88rvJTerjYe5SfQPpKE3h7FFr2a1QkTwa +72Yy4niDtbbg+yXbi34+MHCsMt9jVA8pw9HA6HvapXYAN9EJ1b6zRJ3hx0dQ7TXp +qGKZztuf2yUx82G0jLlN4q7bcHuofD6Mt4ohSTT1sjmIZzU2xN++OGbqKXxC4MH4 +dnE230K9kyVri7erplk8YR+TYZ6pajty0atB5SbI9xJbBr+ogvGPMVrlqJxW6E78 +KzL1/01KVNLSRbtgTPsVAgMBAAGjezB5MB0GA1UdDgQWBBRYiSFTMc5gE7FZn5sk +IMDzPnywdzAfBgNVHSMEGDAWgBRYiSFTMc5gE7FZn5skIMDzPnywdzAPBgNVHRMB +Af8EBTADAQH/MCYGA1UdEQQfMB2CG2NhdGFsb2cuYXBpLmVnb21tZXJjZS5sb2Nh +bDANBgkqhkiG9w0BAQsFAAOCAQEAm7YhTk1y9mxOaabQ/KMU7ygtoyA3W3cu+0dY +zASLAcXxB9/BRnrx3AApAPlcS0lVbIw1xZZCYV7vvWxQoyGJqc/1GR14NOusxx3d +V+6l/wfokCwVGtpwCsL5SxdC7+IRrCCHO8LMmiU74t1AXKXZSUBp+IY2yDlDrY5z +hdtJ5bwJVU5N1tXCHa0ZGbyIAgZcaVgN2CZi344vGO3RvkNZzzLyQsjOlWFhU48x +MlgBfTW2kI0OXBcPa1ytGaSP0glYKslLTirbok83l4iMJ8nMv2KaXntCCeOjyOUw +/San6JpAsoJSe84tbhVsPZXVgCDNL5z4fVRx+CLxt9TGrBZVtg== +-----END CERTIFICATE----- diff --git a/deploy/certs/catalog-svc/client.key b/deploy/certs/catalog-svc/client.key new file mode 100644 index 0000000..cc1e195 --- /dev/null +++ b/deploy/certs/catalog-svc/client.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC9PsaReVh3dNN2 +KSaPFAI8FLraToXVuycU5K5H8n10VkFevNZlgjBL2KmamUqEzn50fMsc3cigCx1R +MFnXNA6kUwCGJ1DRPCn88rvJTerjYe5SfQPpKE3h7FFr2a1QkTwa72Yy4niDtbbg ++yX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mU4j88EahMQKBgBG4 +f8v+kiJUkrzufWOID9tzkiQ8WAdKFwsiJfM6ZFjbTTx/0k7UNVPz9F81TPVtAsP4 +phoje6AyMBqSnPGx2gVoyOiqQlefPpdBLpp/NyeRB/clIefxuThGFGoH8GHiyhgM +rfc0BCUrJW7Guplqj2sWdXKmDj5a3UZi7NuMBZchAoGBALLTYfUIuo8CkilRwcLa +H+BhMTR2khUiK6t4E/I7G121l37Xj+z+J4uui/ofINWqqYlqR4NHrC8VqZK2YfON +GbuQXa8O/rwvtUhjADHFRIiNeQ+iN95ZxtgTIfowD3GD85GSR1hOXn/hpd+732Pt +cj1XWrXS9xNeRsJpPqxfL6dM +-----END PRIVATE KEY----- diff --git a/deploy/certs/catalog-svc/server.cert b/deploy/certs/catalog-svc/server.cert new file mode 100644 index 0000000..4272134 --- /dev/null +++ b/deploy/certs/catalog-svc/server.cert @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEETCCAvmgAwIBAgIUDq9nJvO4GwJunNf8pHaUE64oWdYwDQYJKoZIhvcNAQEL +BQAwgYsxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0 +b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJjZTEMMAoGA1UECwwDZGV2MRQwEgYDVQQD +DAtjYXRhbG9nLXN2YzEhMB8GCSqGSIb3DQEJARYScm9vdEBlZ29tbWVyY2UuZGV2 +MB4XDTIyMTEyNTAzNTgxNVoXDTIzMTEyNTAzNTgxNVowgYsxCzAJBgNVBAYTAlBM +MQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0b3dpY2UxEjAQBgNVBAoMCWVn +b21tZXJjZTEMMAoGA1UECwwDZGV2MRQwEgYDVQQDDAtjYXRhbG9nLXN2YzEhMB8G +CSqGSIb3DQEJARYScm9vdEBlZ29tbWVyY2UuZGV2MIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAt+kKrwzhaJmucwpd/v1b6g/BKcamkneoCAXoSO/rIdCh +gFNE8knnlDsnn6RZo4WSRHa3JO+O71ljZ95d8hi/xJ1Bx4WxVG2xpV/hYIr9C+wy ++EW/5DWnq6j+1iQNKh7Td+Bc7AGN1F3QrtwMOzwasMBHvexW16gtNgoWgE5R6wmf +LrdtPeNtJf7b4fO8SO3TkakVDZayNJv4JzoOTZft5YdAfj9eEXN/IBZTX6aM2/Zq +QYsjRueYGD1+LVF4sgZs3hR8mpJHANU+p+KJ0Q5brR/1sKPsJ+/9Dc7ISVExQquW +MzrqQxaSl/ISGft4o56NmHFB8XNaSFIK5e6ZWXpxUQIDAQABo2swaTAdBgNVHQ4E +FgQU7YlFZUsjUmlXgaDV3CcpSwlrbGwwHwYDVR0jBBgwFoAU7YlFZUsjUmlXgaDV +3CcpSwlrbGwwDwYDVR0TAQH/BAUwAwEB/zAWBgNVHREEDzANggtjYXRhbG9nLXN2 +YzANBgkqhkiG9w0BAQsFAAOCAQEABfdubuXV21K+/UpmZme8wU1WzVOGafT/NEX6 +KpH00g1k95Kv+dSXBLgbx8MN26/RNy7fou6CuS24wZiStZ4zlv+l3BE+eCm93fXl +k3Zp2wDGvblmwjlf2QLN8yspq3Uo1NUwv9MLAYVLxaIGL8X7tmTdM67JratJ3TtW +nEwT8v034B8DYHQfjms1fFKHI1Qf517g/rwmSnMOhzwlsG2/VZ1AT2uXdhxL4+nY +UAn0lAv3VGV4UX3KyCpBiOEPnE0peX4JSaz38bsKyvQ+aUspxtwGZq26gf8nB3oA +I1l3rucME0LvLvZ9TbjK1T+rwUVRQzsvNaK3pHugewo8STOa4w== +-----END CERTIFICATE----- diff --git a/deploy/certs/catalog-svc/server.key b/deploy/certs/catalog-svc/server.key new file mode 100644 index 0000000..da52bb4 --- /dev/null +++ b/deploy/certs/catalog-svc/server.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC36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lx/mK3rLiS7aFzO04aSyyLanYKJH7knr +s0i3SitlnTIFWdcK3F9axxstyHjNN3PHLPlra9qvDf7D3qNXdcP1wHw+N5aD7h+H +MogBsqMaFU5i5qe0RKqUVWG7Deb35oE54vFvYCUOWeldbt/2PkFWZWJTAoGACkaP +PrsVwX6eWDO2nWP4qMrZK8E4LP0KuU9XDqZBqI17Tm/kwkddNXbHE8qoqRUFQe7y +V7CLwVzLy90PjiSS1NN3xKe+cYloSqDaNA+xt0ONTOVtyUXS0NsE6Ir1xMnvetPF +iy3DGXFbGKINF24MR7+tzob4vOcaZti1QHo79RUCgYEA3hl+Xsi9gY1qq7V96upR +cqk5PIAfyXDr11Um5ofyEy/tR0w/0uneE6gKyDwnxXfvx12KoK83Kegrr8uoAy7d +JpaZL9wr9rYIQuFKz7mI6OwDgonSpqjBYnGKy9BufXRFi22/HuLsDJy0MSw9RuPH +cUBXLla2AkboPDIMp/ShMbY= +-----END PRIVATE KEY----- diff --git a/deploy/certs/identity-svc/client.cert b/deploy/certs/identity-svc/client.cert new file mode 100644 index 0000000..c6d6e56 --- /dev/null +++ b/deploy/certs/identity-svc/client.cert @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIERDCCAyygAwIBAgIUIFd8OBJAUAjPahyz/aZ/hYwceNAwDQYJKoZIhvcNAQEL +BQAwgZwxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0 +b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJjZTEMMAoGA1UECwwDZGV2MSUwIwYDVQQD +DBxpZGVudGl0eS5hcGkuZWdvbW1lcmNlLmxvY2FsMSEwHwYJKoZIhvcNAQkBFhJy +b290QGVnb21tZXJjZS5kZXYwHhcNMjIxMTIyMTIyODEwWhcNMjMxMTIyMTIyODEw +WjCBnDELMAkGA1UEBhMCUEwxDjAMBgNVBAgMBVNsYXNrMREwDwYDVQQHDAhLYXRv +d2ljZTESMBAGA1UECgwJZWdvb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rw== +-----END CERTIFICATE----- diff --git a/deploy/certs/identity-svc/client.key b/deploy/certs/identity-svc/client.key new file mode 100644 index 0000000..282c6be --- /dev/null +++ b/deploy/certs/identity-svc/client.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDsuNkypQBSkJ/K +ZVvxLBTvzljUrD9weikpslp/MeUr4fWiFeK+uEmsO2g6MUGrazltsC3jeGv+5vZz +gqaNqqTrQnLZbV6D0OfbLQQw5Asp2LGdNh5uWGV7bWYk2xT/eDqrUQEUkmfe2CB2 +Zjz72ziwM4ALQNzg89sdlaVKVJBGOUJspemR3tzZjmSSLH+UdsbkudYyi0YWRWFW +Bvckj2cae4jBRLZW76r5kYI+++IgmvJp2FGhvekwaNlrXmKkbS9QVLIKT6x1Hz2s +BbRnqBEkAhgMF3b7dYdvzXBnof95QYzEufrimRBnCZan4QBU3v5I5i5V8mf/N5hA +78SrEqVNAgMBAAECggEACYYTpvKgerHlhoe2v+iIHHBu08+XlczfDxW6h6zYOCsV +GM+h7w5hrb44yUPmDSF5OVfXNh7y1ASIHHRAgyk/DVVVDY5VjnQUf+rlukR9ISfe +AsyEmOfm3U+0xlLSG3JuLypJItdpD7weQjqGxZM3n/nScvbJwXsjcPiY986YfLAJ +PzHZsIMEQu98Hx6/orh1AnYuxLF2S4gEuEw07jYbN1pp4mjcM/0exhb8iHIhGI0/ +LjoNnJqdwDg/fvSQ0rMXnzHh9scjBRfQumJG6opDIwpIX5C0Rx5aCjZ2PjVgGZwC +NfOKmOOXCeGWdg/S2GfC5XuFDEWuGUUGM+e3JEUdwQKBgQD1qOGMOj7RPXFq6YKK +g4NhTQRstxyX6yqDEfw4yP793g7yxgNGNeEBEQWKSJ3mz9hvNGzgmT+ypyKtLdYE +cIW/YEGgWnKtIn2ufMNtiR2wAjY9ESKAUkSK+PZNjDSZQ+S6x+UikE/fPDzTanfQ +kSCKgUxhTjKinJodkR7aNk9YlQKBgQD2r6jVgeOL596rNtobPh8+eOlmGJHtDW3T +S8i7JTihaGkZjwXDi8uIALaxh0tBSQYdYKr0oGNQ/l4VytQOh2lhWJgJqUiYYfSO +6AZoD2zlDRMtlpaa5L6xdERq9seZs4HcvIQCzloHRlAxP0KmY6Df4mwuRbAish8u +WMO9NmeT2QKBgQCv21SS8MM1QHnnof/MLncneV3YgYDblAJbz80xzVkU3RjwXCXN +5hYLkGbZ5j/7EgELIolqguohdxoQxQY3KWHlbP+tzfHX1SAJf9DaodR5wiuXraN4 +HuxoW+7d9qdUrFCaES0LgCldUh7s7YOV775OyF6oLbV7yQVecxuV9Fj6vQKBgQDA +6Z/70AbVmy+L72pjUZJ3dXD40ZAUtKLFUYeZqsL9nrxKK4nTYVh6dCxq6qXUWTn5 +8WXfxinE5hdHrYVmE0k6wmCrdYH7AOeSdirEaAO9oBr2VMRUPzxNY+I5T+HJ9hJB +P/9wflTzSW5fBNynaFQfoV7+VKsohulRgkMYjho0CQKBgCQf3/AWlOAWhzQf13dV +HlFqBz4TnRfnMWTudfiNJW46m09B1P9qxjaChzbcpNrcwEr/uWiHOV8VW7wNgzfh +fRJLE2Blhtlra3XAlR+4vXuzKhX3QpBD587fdylo6PDHiSs2B2ezZuNA5LVRO4Jo +F48wR95Qn7NehSUeATWJ2OQu +-----END PRIVATE KEY----- diff --git a/deploy/certs/identity-svc/server.cert b/deploy/certs/identity-svc/server.cert new file mode 100644 index 0000000..879d81b --- /dev/null +++ b/deploy/certs/identity-svc/server.cert @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEFDCCAvygAwIBAgIUTBORz/awvT2stdOG499TXIZlsd0wDQYJKoZIhvcNAQEL +BQAwgYwxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0 +b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJjZTEMMAoGA1UECwwDZGV2MRUwEwYDVQQD +DAxpZGVudGl0eS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meME0YYZOB +nxqeZqaJD8kZXVpWWYiiOSHD4PBPuGjZiCr48bgCGAroiCT+Z+Qyr7BGdV2W+aVl ++S7we06Bc/beG/DMawjYdyP2l8Q+nVF4Vnve3banXWRKxLTbYspEyA== +-----END CERTIFICATE----- diff --git a/deploy/certs/identity-svc/server.key b/deploy/certs/identity-svc/server.key new file mode 100644 index 0000000..17ce437 --- /dev/null +++ b/deploy/certs/identity-svc/server.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDXH8e1C+BmDrv/ +5lp25jbgOzGUkLvp85W6VOyMxLne1rOPmSljFj2zIjF5WIEXGsUa+D9HYdRw5+5W +yDrmXx6esEjY1Uft31A4ec5uzIVz0G5wXlPBmwXv6U4asEowvPLLR96Va+zyIGKw +srB8dHo+LYtKCHMbW2ntCVqz6LpsqHxYwJ66kfBz9B+25CJmRk5c3YnGDCr3ArUY +KQi4PCU8rf3bMWft1iPjT3vAMniWnnDWS0KYtPV3VcRyUwCXRJrKMczmEcfsu1eb +2nofNtlH0AXDx70g0LtemciMk+nUB75d3d8LOAvccV1+L7IbTvhgqXypgK+tzXvG +r5kwPjvXAgMBAAECggEADFumLdIxAbvj9JHnmCqmdArX0M3gYFK0GGsA1x9arCCl +BQv1PYd4Dj6EcrubrYJGA27Ht9KOES8JrpDnF/fWkE2BNHpKx7FLRaCdtBi/VoVe +lXRIbHf63IAzEpkWUfwbbdkYQiOGjkGVBHXnaebeZOGvPZavAh8mE84J7gmMYr8k +v1JEd8vb8t7nP06U3vE7MxA8+KvZJ5AVA816uP4JbF7FW/qiYuYrZVVQioOxJVmb +KIigf8DqV8xya8XkX+Y9Sbgwa6ReDJhlLHZSbFdsvU6m7im5rLT0920/OLMeRFlx +7eMxRY1U1j4FOki76R1gwFvAYz47dxwQqXx0V4deWQKBgQD1El0P4JwYst/p2NZQ +5pZhRSjjmCzznhi41d0tvPF/ebP/HSJZuyDRViW81Ct07l90GKfPrIrRmyyRwqmx +W7SeyvLBr7HuNqGxTXo941DTyvnO4hLde/rXJHSpKEmdhMAw6BE6TlcoEiRqWE2x +9NSwLrcqB3yyKJqMWKBwPd8vmQKBgQDgt4wiChd/DumRXd4Gy8fxPjsIa1qnuxv4 +QUPxerxSnju16UWTe419YOHbrIkjv9ASNQuy0IG27Kom60BbOcxO6WXcaE975lNf +arszirT0oZAam3FohDumTOunjKhi8ZwOBWzHUheofcGXLtxyDoXZyOa5SX9Bh1yK +7+pih9as7wKBgEJOyac2GoYEP9lBthsFiMKgt8N8tQzlRcMc+k8ZxC29fBoWg+jL +XMHHEUbaETf+Fw2ObjkeciDsX07A4LEAIwqj1rLZGsddOLqEQALmskPbs2Nqf7g1 +h1UWpAnwwJpCBM42vBKOh75ryjaL1dnEaJeSzDQu+mop2kcG48H6u5xhAoGBAKlW +Z4k3JaGfsS7UF33zjkYi6QVdMMF45IjdVb/hB40SpFhe4wlSb7rtiQWrLOT9pGQ0 +CQ7ExRr9mPMfEC4ujeFhTFsdV9g8JtOecFdUzSwTm64RORLTosec63AlNLbq7vg5 +6lEBccaMjZfJvmFMxFzrYcJ6uiS9RmWEiZGaX5GNAoGBAM7FDXUw35VxdC5yAfnR +9c1uWpbzZ4D/GDRrVA7T7iu2AWiUtAyDrqhnLUcDuRedxgZlBhZs1rGNVK5ZsinJ +ogRruDRcUw1mv0mRzo2JGGLAUsG7p8qJkjRAUrN8u/6Jm8VVDuQS6GzByI0/wKqR +FARhzIKCJ2l6Q/xWd/RIfwaS +-----END PRIVATE KEY----- diff --git a/deploy/certs/make-ca.sh b/deploy/certs/make-ca.sh new file mode 100644 index 0000000..2ebc9f7 --- /dev/null +++ b/deploy/certs/make-ca.sh @@ -0,0 +1,36 @@ +# #!/bin/sh +# # Based on: https://gist.github.com/granella/01ba0944865d99227cf080e97f4b3cb6 + +# PASSWORD=V3ryS3cr3tP4ssw0rd + +# echo "====================================================" +# echo "Creating fake third-party chain root -> ca" +# echo "====================================================" + +# # generate private keys (for root and ca) +# keytool -genkeypair -alias root -dname "cn=egommerce.local" -validity 3650 -keyalg RSA -keysize 2048 -ext bc:c -storetype PKCS12 -keystore root.p12 -keypass $PASSWORD -storepass $PASSWORD +# keytool -genkeypair -alias ca -dname "cn=egommerce.local" -validity 3650 -keyalg RSA -keysize 2048 -ext bc:c -storetype PKCS12 -keystore ca.p12 -keypass $PASSWORD -storepass $PASSWORD + +# # generate root certificate +# keytool -exportcert -rfc -storetype PKCS12 -keystore root.p12 -alias root -storepass $PASSWORD > root.pem + +# # generate a certificate for ca signed by root (root -> ca) +# keytool -storetype PKCS12 -keystore ca.p12 -storepass $PASSWORD -certreq -alias ca \ +# | keytool -storetype PKCS12 -keystore root.p12 -storepass $PASSWORD -gencert -alias root -ext bc=0 -ext san=dns:ca -rfc > ca.pem + +# # import ca cert chain into ca.p12 +# keytool -storetype PKCS12 -keystore ca.p12 -storepass $PASSWORD -importcert -trustcacerts -noprompt -alias root -file root.pem +# keytool -storetype PKCS12 -keystore ca.p12 -storepass $PASSWORD -importcert -alias ca -file ca.pem + + + + + + +# # openssl req -new -keyout api-registry-ca.key -out api-registry-ca.req + +# # openssl x509 -signkey api-registry-ca.key -req -days 3650 -in api-registry-ca.req -out api-registry-ca.crt -extensions v3_ca + +# ##### +# # +# # keytool -alias root -dname "cn=RootCA, ou=Root_CertificateAuthority, o=CertificateAuthority, c=IN" -genkeypair -storepass "V3ryS3cr3tP4ssw0rd" -keyalg RSA diff --git a/deploy/certs/make-cert.sh b/deploy/certs/make-cert.sh new file mode 100644 index 0000000..48825e5 --- /dev/null +++ b/deploy/certs/make-cert.sh @@ -0,0 +1,60 @@ +# #!/bin/sh + +openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./cert/identity-svc-server.key -out ./cert/identity-svc-server.cert \ + -addext "subjectAltName = DNS:identity-svc" +# ^^ GENERATE CERT FOR BACKEND SERVICE (on client side - in traefik - we dont need DNS domain... for now...) + + +# if [ -z "$SERVICE" ]; then echo "set SERVICE var"; exit 1; fi +# if [ -z "$CA_ROOT" ]; then echo "set CA_ROOT var"; exit 1; fi +# if [ -z "$DOMAIN" ]; then echo "set DOMAIN var"; exit 1; fi + +# PASSWORD=V3ryS3cr3tP4ssw0rd + +# # sample for registry server (with api-gateway-svc as a client) but using FDN... +# # keytool -genkey -alias api-registry-svc -dname cn=$DOMAIN -validity 365 -keystore tmp/api-registry-svc.p12 -keyalg RSA -keysize 2048 -storepass $PASSWORD -ext "SAN:c=DNS:registry.egommerce.local,IP:127.0.0.1" +# # keytool -genkey -alias myClientCertificate -dname cn=$DOMAIN -validity 365 -keystore tmp/myClientCertificate.p12 -keyalg RSA -keysize 2048 -storepass $PASSWORD -ext "SAN:c=DNS:registry.egommerce.local,IP:127.0.0.1" + +# # keytool -export -alias myClientCertificate -file tmp/myClientCertificate.crt -keystore tmp/myClientCertificate.p12 -storepass $PASSWORD +# # keytool -export -alias api-registry-svc -file tmp/api-registry-svc.crt -keystore tmp/api-registry-svc.p12 -storepass $PASSWORD + +# # keytool -import -alias myClientCertificate -file tmp/myClientCertificate.crt -keystore tmp/api-registry-svc.p12 -storepass $PASSWORD # aka myCertificate.p12 + +# # echo "Done." +# # exit 0 + +# if [ -d "$SERVICE" ]; then +# echo "$SERVICE directory exists... Quitting." +# exit 1; +# fi + +# if [ ! -f "$SERVICE" ]; then +# mkdir -p $SERVICE +# fi + +# echo "====================================================================" +# echo "Fake third-party chain generated. Now generating keystore.p12 ..." +# echo "====================================================================" + +# # generate private keys (for server) +# keytool -genkeypair -alias $SERVICE -dname cn=$DOMAIN -validity 365 -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore "$SERVICE/keystore.p12" -keypass $PASSWORD -storepass $PASSWORD + +# # generate a certificate for server signed by ca (root -> ca -> server) +# keytool -storetype PKCS12 -keystore "$SERVICE/keystore.p12" -storepass $PASSWORD -certreq -alias $SERVICE \ +# | keytool -storetype PKCS12 -keystore "$CA_ROOT/ca.p12" -storepass $PASSWORD -gencert -alias ca -ext ku:c=dig,keyEnc -ext "SAN:c=DNS:$DOMAIN,IP:127.0.0.1" -ext eku=sa,ca -rfc > "$SERVICE/$SERVICE.pem" + +# # import server cert chain into ${SERVICE}.p12 +# keytool -storetype PKCS12 -keystore "$SERVICE/keystore.p12" -storepass $PASSWORD -importcert -trustcacerts -noprompt -alias root -file "$CA_ROOT/root.pem" +# keytool -storetype PKCS12 -keystore "$SERVICE/keystore.p12" -storepass $PASSWORD -importcert -alias ca -file "$CA_ROOT/ca.pem" +# keytool -storetype PKCS12 -keystore "$SERVICE/keystore.p12" -storepass $PASSWORD -importcert -alias $SERVICE -file "$SERVICE/$SERVICE.pem" + + +# # DEPRECATED - duplicated above section... +# # echo "=================================================" +# # echo "Keystore generated. Now generating truststore ..." +# # echo "=================================================" + +# # import server cert chain into my-truststore.p12 +# # keytool -storetype PKCS12 -keystore "$SERVICE/keystore.p12" -storepass $PASSWORD -importcert -trustcacerts -noprompt -alias root -file "$CA_ROOT/root.pem" +# # keytool -storetype PKCS12 -keystore "$SERVICE/keystore.p12" -storepass $PASSWORD -importcert -alias ca -file "$CA_ROOT/ca.pem" +# # keytool -storetype PKCS12 -keystore "$SERVICE/keystore.p12" -storepass $PASSWORD -importcert -alias $SERVICE -file "$SERVICE/$SERVICE.pem" diff --git a/deploy/certs/order-svc/client.cert b/deploy/certs/order-svc/client.cert new file mode 100644 index 0000000..9503c34 --- /dev/null +++ b/deploy/certs/order-svc/client.cert @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEOzCCAyOgAwIBAgIUNTc01c06pmV6uK6obJcn3LmDWNgwDQYJKoZIhvcNAQEL +BQAwgZkxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0 +b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJjZTEMMAoGA1UECwwDZGV2MSIwIAYDVQQD +DBlvcmRlci5hcGkuZWdvbW1lcmNlLmxvY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W0fyArNi +74g/TpqcSvOkx/TGY52OAdGwwS88NS7zyHkQ2JM9LzZ5Gk1Gky/zCJ4Gz4ewZR4k +2Fe2zMMizfcNcRbPun3Za91zgfXEhAtNB0sALe/rNrE8sS5mQAd2wS1J55DPz/EY +TVrh0wDF+sZsCBA9Sl2JPJkyU95MaE2RL0/plgwTGQ== +-----END CERTIFICATE----- diff --git a/deploy/certs/order-svc/client.key b/deploy/certs/order-svc/client.key new file mode 100644 index 0000000..4454dc3 --- /dev/null +++ b/deploy/certs/order-svc/client.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCnUfORZ3VvQBto +0HfMfhrRMgPR8kBFA2GL3xj/hXJJOWILoyIZB5JiBA7jcxzWdh1YPIBSK99O4/35 +cf9z4pTSGUVy4tmQ0zBmARl3DcxffH0m0doOqHKFP5YiFXfWrH8p98JFGawardLl +um6jtQa7+jl3nler26YgSORi7biPludkoeRJ88GpEf754x7enivQYFSv3SA9MIuE +/+4EQaN50CsHSmied1a1WUfTq8r4se++tR4kxA0jRflFgG2XE3NQDMCVQHq7wJuA +VBnobSr7jG/O00U3z0foJFhw6KeQ6Swb5lX2RetuUxiwtRFmI4Otvv+ixrJYFcty +DLgjjrTJAgMBAAECggEAAPBHhBFCzmqXFD0CEbKhIWpJxrsndTU/8oiNBD+HfW0y +vvfmM7NorD18DeVyC+8ia3kgejeo2lN5BPOiY+m6gaecCVthjFMhW2gPtKzDgdRq +6U8AyT3uMXZLOBL+jjOyg9oex6GWEbvX9KcVPkT8EC+vYuiPg/D7/Ui0/nislCJq +mcygi14vIFxKBIglSzGVanZGYiYdJLSktKxZJzwit5uiBwiGeEBnN+rftTyCiN6j +2VH+3bja9MzfNdU3Z/OU1TqWBNa3aE9Xn7fOXEQS52F/1pE4vOahPNS0YT2xDf2H +1ZN57yMYynmAXy5prDhrjIPhPwOxsN5faNPiUyJGjwKBgQC296lhRRAur//niWIp +0w5qfR4sDWQv6L8BpMG35+2YtOyaQfNgLQNXwI8S6pMV0/XK5i/8krRxiFQoGysT +Y3uMehhfF1S1QwcFkpXx6i7scyssXPJnF24OpiWqtfrsW625OQOz65ymtkGOSrm7 +B6+yjOPzKJUU4ttpdMMrOBR9jwKBgQDqG2LQOV+kyqMELrl7kzPI0GAAFzp1bzcz +Nzm2jUKY3OyjyArN35Zkoay7yR8uOqQbZzGOTeWiHLlQFStKBbCQLhNbsenV+tZe +HAF2JISwarafSvsL9B1ZesOZCkkYTHosIgNmiokCE0uPcoDnxB+4PoXvj0nMO10l +Sn5MB/UsJwKBgQCIaTsaLyByfntfR3ktT5KW6DN/inhgk7kcY5aeI0dsK6+fDn6B +/O1aFlFVPBhvFLlTDa1HNKVdY9PClwbVjL0HLdxPwRhBj/iDOhea5gsX9IGCsMV1 +AO3n9A1vKgArCesKhixxjr8bOBTGHoY8n+1pREuK9X24ta36ALil10jHlwKBgEzI +dK1k0/jhuXvqs01Tp31q0sHU3Iid1JYIu/Yi+L/YXgkN2HVTqykQWe4xdfecpiyS +uQ86f2GfWCxq9QrPOOzhH9pITTCwl9TADL6qFZcjOQif+B0gkOvDNxof5H+CveNx +uHnOYEd8+qBu5tadXeX5I8bB0WuZ4OAVQb1AMuqrAoGAVeOSGKXSUjCxQ9gWEMDM +qhsezV06s6OYZbD5Hf/8DypjUfe/VB5PuIR+CbeZkXXPqIMFum+tFspPrDesLLDM +v6LV3S+bHG5PJBConsLwkP0TGkXJWs7u6vIVICqoXq0yIgSjjWZPwR9ryiQ4CvH0 +RrmCsYY2AI4ypVW2IjBR0+s= +-----END PRIVATE KEY----- diff --git a/deploy/certs/order-svc/server.cert b/deploy/certs/order-svc/server.cert new file mode 100644 index 0000000..f60596e --- /dev/null +++ b/deploy/certs/order-svc/server.cert @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIECzCCAvOgAwIBAgIUNN5Tpspjfuk2hvkW88SrIhL3GEgwDQYJK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T1FDAJ/ToiNO/61SUueCJoXAFo+fh56D1lj9Tw+thNPcjzL +9rR36by3UF9CTnxkyafdtHGGZFSoOoXRAQfbU30ch7tvXTJ4hNBAhniVCZ4geb/Z +TA+2TCxFkvpMVM+ohSqk+EP7xRbFNlta7J8+OwPo5b4UK+tmOvP1Kvwqb+Uq0Uiv +p5PIv3B3XwFXQNeCcdS3doPZx6quAmEk9HcfA31BMIuVAW66Hv1l2jS0/Hk0VTwB +3XaYTzBMQCTKznvTm0h889N3QPZcXfyJcd1SkRMT0w== +-----END CERTIFICATE----- diff --git a/deploy/certs/order-svc/server.key b/deploy/certs/order-svc/server.key new file mode 100644 index 0000000..3dfe964 --- /dev/null +++ b/deploy/certs/order-svc/server.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDMRHAeroKJl1lN +ePAbFgDSrl9Luzhl6Yx1kFCT4TzrDnKsjan7y7bbudSPCAphM4KbWjdVr0uUOmBx +eKbiKJxduz03pm1ipba3XF349MqtlH7rrb8LdTctdoKBqZTLiuNdRZh6Y0b3Yn9+ +KIDsuMUr16vr+j55H9kRJt9lyXMLcKQg5zriv/WZjOfQLhOp6mkcIgb0I/z23ey5 +UlMSdU1vzdhWjoiTDzchbRjHIH9FBGq1KASCXM6g/1riciEm6gmC/R3LvEFqWFdF +dVJXfwPir62JsY/b16SdC79GGJ5t9bxSK++hywwdJA8HGToeQXGnfPFQDcGccYH9 +gPhCqKVLAgMBAAECggEARetzOX1gn3pYDiXEgnEArR0U75ZRUskj1CYm/seNk6Qp +apk/QzpTCFlOwfrtmqIIJec2o7TSORXWZ2D2NtnR1F/AL6lfLfItXgxW+l3Idqwq +2b9qcqCX148GUx3aGeYbt5SYAeSzqQBlRajVoLIKg9xaM/c/pTRal/1nYK8ZGyPB +z8uQZ4NRMa5jwdJ/uMmhhdjlIyKQPK2zTIbLIeKI0sbTswsD4krJPWHk9jyg9I9S +cccL3gUmvOhUaaY/Ml+zuXnrC2rpN3ZVXabHZVa7sQXcATbUmlF7nnVDE123AaPa +foBCnPl38v/Zei96YWE4Yu1BYXMW+u89Pdx6gIMcwQKBgQDcChaO32LtQWun0hYn +mSPhV6O3MqK8wXf+GftO2HoTMpqTV1zsCVPQ7cGU1xHkziG/LZZA3nFp+B6rkqnm +EnOGVmmgiFwkicoKLoelGYY8oZtslHP99Ix2Lfk9+sBVxqUWuVN7XfdmvtiPBYwe +iVRf1VrlIzI7O6sJRVHoKDI44QKBgQDtpnwhnzG0mtMwQ8VOYs+E7pYseGp91E7B +TcGVWn9Mkv90ZxzPBSdquA5n3+zs0idM4Rm3cLzQK1A1Ufc2+d0AEuRwOiTSTAxh +VY30UCwNEA8vxWGn8BpCh9k8GP+iDJt+vGhJY2bzKC7CgIHt3ivZLr5W6glK5lAs +3UZ22t6HqwKBgQCdhedSTt+eZBgy4zaTEJHcL4Z3jxtrr8E8OtNrRZRXDAIW+xL9 +s0u6pYrRCAq6V0tXdsY7GEPvDf6+61cP6yOjB1fE4fm8+puWIGthKV2tKDCBUeGb +66dmr1DgKxPoFDZ5hyEZj1Kezn9wHBOMhNnPZYkVwtWiC/xMvcB+R9B0YQKBgQDh +it3IMwPDeiTwa4E4MYLtkFmp/uZiYToVLyyICIlELUaQPMQUnbmZCPFzGAwNfi2a +QxBbDn3Duze2QwIyhNR/m25+LFCB3XbqcX313pjQFOu01MknzzG87pz28mq6auiw +UTNQYyxznTEzmy60h+RpjHlMl3UWRprU2XRknLgRXQKBgQDTZi10Im6sCDj5mdZg +zoprwvA25a6T7+pGVcdU1Q4VKRVOVov+MTB86u3hgeIndT9tf0rcr2nyomlPhaCY +DOpXxjjdaHKtHS0Q4/+qIpCfKnXz7djcHT8sQmKopccUt9znmjMRyowj4mlcDCMd +aZDD2+BfsGg1WEdBf4A67pjgxA== +-----END PRIVATE KEY----- diff --git a/deploy/certs/postgres-svc/client.cert b/deploy/certs/postgres-svc/client.cert new file mode 100644 index 0000000..2d064e9 --- /dev/null +++ b/deploy/certs/postgres-svc/client.cert @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEJjCCAw6gAwIBAgIUbJLhXjm6jTy3n9tQlOjmE3fh7zkwDQYJKoZIhvcNAQEL +BQAwgZIxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0 +b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJjZTEMMAoGA1UECwwDZGV2MRswGQYDVQQD +DBJkYi5lZ29tbWVyY2UubG9jYWwxITAfBgkqhkiG9w0BCQEWEnJvb3RAZWdvbW1l +cmNlLmRldjAeFw0yMjExMjYwMTQ1MjhaFw0yMzExMjYwMTQ1MjhaMIGSMQswCQYD +VQQGEwJQTDEOMAwGA1UECAwFU2xhc2sxETAPBgNVBAcMCEthdG93aWNlMRIwEAYD +VQQKDAllZ29tbWVyY2UxDDAKBgNVBAsMA2RldjEbMBkGA1UEAwwSZGIuZWdvbW1l +cmNlLmxvY2FsMSEwHwYJKoZIhvcNAQkBFhJyb290QGVnb21tZXJjZS5kZXYwggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDofql0egapsaqJDu+xSzpteljs +kHlZ8qulXU4BBmU6mxBGqOnC0s3xRJQrcEzAF1Ep5T9DlFam3TGnbYwByOpdap/b +A6eAmShRnpKac+6OsFIVTL6o4Jn2ib79B2M6u+E+7Jmgb28BIDceBT4ESm4rdzpH +tl2OZLl6yPnw9VkIw+mojMqxK2k+VzExYOpzAnSj4Cvo3ZRW01vTJInd0xNspsXs +FwPcl4carWuHfr7eMlqlsPjuSj9FXQeqbobm6S0X0d8kPlnasbbx/gEV9zbktspp +3+qzi7zk7D84M0nNq+B9WmXzfBRAYsywYkGZ7Y5ajfoiKlqQqdSie7VwhuAbAgMB +AAGjcjBwMB0GA1UdDgQWBBSdyFY07s0uYvjzHvz0vP5RRHSSnTAfBgNVHSMEGDAW +gBSdyFY07s0uYvjzHvz0vP5RRHSSnTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdEQQW +MBSCEmRiLmVnb21tZXJjZS5sb2NhbDANBgkqhkiG9w0BAQsFAAOCAQEAhb2YINIv +ls6PV9r6+47aFJSTaLqWLURsB96kaJJ5cnIbRflyKhxNvnwm45I8h86YW8rRsX74 +TIcCGFzqgvicf5gDkKWojUyURvql5JKGGw+JQsTohu2kiQ7wPuEPDVFo8oJzte+Q +LFsz/7murkq7XoRJAzOuv9QwFDNJ8kB7f/WMHCThW5vJioo4Sb1aobTOFJR/NbgQ +YHBSlnGbcVUlwq1nfyqsLgqJmz23af8bbd4/8qnBvxx5o7suDGSrBHF1TIEyfMvq +U9RbOrGkcIlCgVfLUsmmjBwwqrICuzvkMIddyJvYJO3Vp1wGkqUhCOSLDTaG7OtJ +JQ4xbsIsgorbBQ== +-----END CERTIFICATE----- diff --git a/deploy/certs/postgres-svc/client.key b/deploy/certs/postgres-svc/client.key new file mode 100644 index 0000000..c8bb3a5 --- /dev/null +++ b/deploy/certs/postgres-svc/client.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEugIBADANBgkqhkiG9w0BAQEFAASCBKQwggSgAgEAAoIBAQDofql0egapsaqJ +Du+xSzpteljskHlZ8qulXU4BBmU6mxBGqOnC0s3xRJQrcEzAF1Ep5T9DlFam3TGn +bYwByOpdap/bA6eAmShRnpKac+6OsFIVTL6o4Jn2ib79B2M6u+E+7Jmgb28BIDce +BT4ESm4rdzpHtl2OZLl6yPnw9VkIw+mojMqxK2k+VzExYOpzAnSj4Cvo3ZRW01vT +JInd0xNspsXsFwPcl4carWuHfr7eMlqlsPjuSj9FXQeqbobm6S0X0d8kPlnasbbx +/gEV9zbktspp3+qzi7zk7D84M0nNq+B9WmXzfBRAYsywYkGZ7Y5ajfoiKlqQqdSi +e7VwhuAbAgMBAAECggEAcjsJdzkdXPL2HzE/g5S6uF+MoW66sP8SZsVZNhe2VP0r +GgyUDi0VE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WvsaabNdHJUkkF +HoWqnhL+dIxWkSdciRHNL/XIT13xlrW4pMdYHdKFk2KZOyVFUU1DNlTN8Rt9N3yJ +Yjh9wQCJOTbvZuCALEQ= +-----END PRIVATE KEY----- diff --git a/deploy/certs/postgres-svc/server.cert b/deploy/certs/postgres-svc/server.cert new file mode 100644 index 0000000..8372acc --- /dev/null +++ b/deploy/certs/postgres-svc/server.cert @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEFDCCAvygAwIBAgIUUEuWMZjcXIn68ZYkcSIt7gRii4YwDQYJKoZIhvcNAQEL +BQAwgYwxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0 +b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJjZTEMMAoGA1UECwwDZGV2MRUwEwYDVQQD +DAxwb3N0Z3Jlcy1zdmMxITAfBgkqhkiG9w0BCQEWEnJvb3RAZWdvbW1lcmNlLmRl +djAeFw0yMjExMjYwMjA0MDBaFw0yMzExMjYwMjA0MDBaMIGMMQswCQYDVQQGEwJQ +TDEOMAwGA1UECAwFU2xhc2sxETAPBgNVBAcMCEthdG93aWNlMRIwEAYDVQQKDAll +Z29tbWVyY2UxDDAKBgNVBAsMA2RldjEVMBMGA1UEAwwMcG9zdGdyZXMtc3ZjMSEw +HwYJKoZIhvcNAQkBFhJyb290QGVnb21tZXJjZS5kZXYwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQC6DM64V+JeZpXBPJe4uCBzrN/XOdOKcwga+3peOxO7 +hhEaswmUizR2NbItiQOIYZmPF/l/fEkiFWlBKNLSk8Sz+nYL3PTC4rRI9ukVQsOV +sS5qQuAt+gsCJq0RxtW0cH/Op8C7UrwiGLbbIilv1EVNEBheIYaYyxl2u8jwIZxS +IOPrcUJyohQfEre/loo3F0CMGFhoWnWwRRN32O9Xcp7F/LOn1U4N7lQwcfQzE8gW +St2UHuyPMWI9pPvhiC3yZw5NadGiOEvrqVtj4gcMuA0vVZN4rbXklDK+lClCYDtM +UO4cJSe6xXiAXog2y1bNa9u2YG0Bh5NtYVfK+Zp0PnmFAgMBAAGjbDBqMB0GA1Ud +DgQWBBSjKGuhK/jQqOFe+UqDXxNh5IdJRzAfBgNVHSMEGDAWgBSjKGuhK/jQqOFe ++UqDXxNh5IdJRzAPBgNVHRMBAf8EBTADAQH/MBcGA1UdEQQQMA6CDHBvc3RncmVz +LXN2YzANBgkqhkiG9w0BAQsFAAOCAQEAg5QAX8WZz7/hJXpvAXW1pZnF66URw0Gy +W6rni3b/e4iD+2Gq19WHpR03KlwaTq18CrsUYb/djf0/3KYkwdF/8btzUcoNpPfD +tSTogNTfCb1zUF6YxUcOJFZboL9D+lkPypDX/+Y9MbyoTpS2GW6kn/CrT9WpkGUL +ZsT2f5zHlZ+NDxt2J+dAZtwx9j7p/bND3JnMKEDzLX1vmevwZG/Rj4NvDMkddxek +4hwKVoezgj6y5qTscJNDIkuiZsRd8bkguZ+ywIrFFjZ3Hadaszq71ap1jymuuOFm +BQQTt+xRJLJRlvQnno7Dmuz8O62zf3Eb8y8KDHPukyPJIoM+FsXLnw== +-----END CERTIFICATE----- diff --git a/deploy/certs/postgres-svc/server.key b/deploy/certs/postgres-svc/server.key new file mode 100644 index 0000000..337a5cd --- /dev/null +++ b/deploy/certs/postgres-svc/server.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC6DM64V+JeZpXB +PJe4uCBzrN/XOdOKcwga+3peOxO7hhEaswmUizR2NbItiQOIYZmPF/l/fEkiFWlB +KNLSk8Sz+nYL3PTC4rRI9ukVQsOVsS5qQuAt+gsCJq0RxtW0cH/Op8C7UrwiGLbb +Iilv1EVNEBheIYaYyxl2u8jwIZxSIOPrcUJyohQfEre/loo3F0CMGFhoWnWwRRN3 +2O9Xcp7F/LOn1U4N7lQwcfQzE8gWSt2UHuyPMWI9p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i3l2uUdLsPO +WLv5W07CDL6jOpTAveHpyJP6xCToJJ5rIOjJAuiyAZuZpUZuG3zXistWAZQbj6MV +pKAJLwDHe3UggxNuJiTOBNkKHmGuKmoWkc0iO9UCgYAXXXleC4Ok06nwzFdgvRb4 +LQVZdUYRCEpZamhfdBWFU+o1gJJIk5edBPcAFJZ4w0FVDGqw2UCV9dzqaigttsNT +N7FU5vAhh9QIAo9TLp2ZiwzCdHdYf+rUiYkemS0X8T/Q1xdj1u6gIkJNGrko7kXD +PSQKup9IJi8n/jH9arle4A== +-----END PRIVATE KEY----- diff --git a/deploy/egommerce-stack.dev.yml b/deploy/egommerce-stack.dev.yml index 86c14ae..85c2fa9 100644 --- a/deploy/egommerce-stack.dev.yml +++ b/deploy/egommerce-stack.dev.yml @@ -1,21 +1,130 @@ version: "3.9" services: - postgres_svc: + # INFRASTRUCTURE SERVICES + api-gateway: + image: git.pbiernat.dev/egommerce/api-gateway:dev + hostname: gw.egommerce.local + environment: + - APP_DOMAIN=gw.egommerce.local + ports: + - '8443:443' + - '8888:8080' + volumes: + - ./certs:/etc/traefik/certs + + api-registry: + hostname: registry.egommerce.local + environment: + - APP_DOMAIN=registry.egommerce.local + ports: + - '8500:8500' + - '8600:8600' + - '8600:8600/udp' + + api-eventbus: + image: git.pbiernat.dev/egommerce/api-eventbus:dev + hostname: eventbus.egommerce.local + environment: + - APP_DOMAIN=eventbus.egommerce.local + # - RABBITMQ_DEFAULT_USER = admin + # - RABBITMQ_DEFAULT_PASS = passw123 + ports: + - 5672:5672 + - 15672:15672 + + api-logger: + image: git.pbiernat.dev/egommerce/api-logger:dev + hostname: logger.egommerce.local + environment: + - APP_DOMAIN=logger.egommerce.local + + postgres-db: + hostname: db.egommerce.local + environment: + - APP_DOMAIN=db.egommerce.local + - POSTGRES_PASSWORD=12345678 ports: - '5432:5432' + # volumes: + # - ./certs/postgres-db:/certs + + mongo-db: + hostname: mongodb.egommerce.local + environment: + - APP_DOMAIN=mongodb.egommerce.local + - MONGO_INITDB_ROOT_PASSWORD=12345678 + ports: + - '27017:27017' + # volumes: + # - ./certs/mongo-db:/certs + + # API micro-services + identity-svc: + image: git.pbiernat.dev/egommerce/identity-svc:dev + hostname: identity.api.egommerce.local + environment: + - APP_DOMAIN=identity.api.egommerce.local + - DATABASE_URL=postgres://postgres:12345678@db.egommerce.local:5432/egommerce + - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.local:27017 + - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.local:5672 volumes: - - postgres_data:/var/lib/postgresql/data - environment: - - POSTGRES_PASSWORD=12345678 + - ./certs/identity-svc:/certs - identity_svc: + basket-svc: + image: git.pbiernat.dev/egommerce/basket-svc:dev + hostname: basket.api.egommerce.local environment: - - DATABASE_URL=postgres://postgres:12345678@postgres_svc:5432/egommerce + - APP_DOMAIN=basket.api.egommerce.local + - DATABASE_URL=postgres://postgres:12345678@db.egommerce.local:5432/egommerce + - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.local:27017 + - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.local:5672 + volumes: + - ./certs/basket-svc:/certs - basket_svc: + catalog-svc: + image: git.pbiernat.dev/egommerce/catalog-svc:dev + hostname: catalog.api.egommerce.local environment: - - DATABASE_URL=postgres://postgres:12345678@postgres_svc:5432/egommerce + - APP_DOMAIN=catalog.api.egommerce.local + - DATABASE_URL=postgres://postgres:12345678@db.egommerce.local:5432/egommerce + - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.local:27017 + - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.local:5672 + volumes: + - ./certs/catalog-svc:/certs -volumes: - postgres_data: ~ + order-svc: + image: git.pbiernat.dev/egommerce/order-svc:dev + hostname: order.api.egommerce.local + environment: + - APP_DOMAIN=order.api.egommerce.local + - DATABASE_URL=postgres://postgres:12345678@db.egommerce.local:5432/egommerce + - MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.local:27017 + - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.local:5672 + volumes: + - ./certs/order-svc:/certs + + # Workers (EventBus) + basket-worker: + image: git.pbiernat.dev/egommerce/basket-worker:dev + deploy: + replicas: 2 + environment: + - DATABASE_URL=postgres://postgres:12345678@db.egommerce.local:5432/egommerce + - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.local:5672 + + catalog-worker: + image: git.pbiernat.dev/egommerce/catalog-worker:dev + deploy: + replicas: 2 + environment: + - DATABASE_URL=postgres://postgres:12345678@db.egommerce.local:5432/egommerce + - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.local:5672 + + order-worker: + image: git.pbiernat.dev/egommerce/order-worker:dev + deploy: + replicas: 2 + environment: + - DATABASE_URL=postgres://postgres:12345678@db.egommerce.local:5432/egommerce + - EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.local:5672 diff --git a/deploy/egommerce-stack.yml b/deploy/egommerce-stack.yml index 24b7755..03f8ceb 100644 --- a/deploy/egommerce-stack.yml +++ b/deploy/egommerce-stack.yml @@ -1,51 +1,260 @@ version: "3.9" services: - postgres_svc: + api-gateway: + image: git.pbiernat.dev/egommerce/api-gateway:latest + environment: + - APP_NAME=api-gateway + - APP_DOMAIN + networks: + - api-gateway-network + - api-logger-network + - identity-svc-network + - basket-svc-network + - catalog-svc-network + - order-svc-network + volumes: + - /var/run/docker.sock:/var/run/docker.sock + + api-registry: + image: hashicorp/consul:1.14 + environment: + - APP_NAME=api-registry + - APP_DOMAIN + volumes: + - ./etc/consul/server.json:/consul/config/server.json:ro + command: "consul agent -config-dir=/consul/config" + networks: + - api-registry-network + - api-logger-network + - api-gateway-network + - identity-svc-network + - basket-svc-network + - catalog-svc-network + - order-svc-network + + api-eventbus: + image: git.pbiernat.dev/egommerce/api-eventbus:latest + environment: + # - RABBITMQ_NODENAME=api-eventbus + - APP_NAME=api-eventbus + - APP_DOMAIN + volumes: + - rabbitmq_data:/var/lib/rabbitmq + - rabbitmq_logs:/var/log/rabbitmq + # labels: + # - "traefik.enable=true" + # - "traefik.tcp.routers.eventbus-svc.rule=HostSNI(`*`)" + # - "traefik.tcp.routers.eventbus-svc.service=eventbus-svc" + # - "traefik.tcp.routers.eventbus-svc.entryPoints=eventbus" + # - "traefik.tcp.services.eventbus-svc.loadbalancer.server.port=5672" + networks: + - api-eventbus-network + - api-registry-network + - api-logger-network + + api-logger: + image: git.pbiernat.dev/egommerce/api-logger:latest + environment: + - APP_NAME=api-logger + - APP_DOMAIN + networks: + - api-logger-network + + postgres-db: image: postgres:14.1-alpine - # hostname: postgres environment: + - APP_NAME=postgres-db + - APP_DOMAIN - POSTGRES_USER=postgres - - POSTGRES_PASSWORD=SuPerTrudneHasloNaKoniecTrzebaWygenerowac + - POSTGRES_PASSWORD + # labels: + # - "traefik.enable=true" + # - "traefik.tcp.routers.postgres-svc.service=postgres-svc" + # - "traefik.tcp.routers.postgres-svc.entryPoints=db" + # - "traefik.tcp.services.postgres-svc.loadbalancer.server.port=5432" + volumes: + - postgres_data:/var/lib/postgresql/data networks: - - postgres_network + - postgres-db-network + - api-logger-network - apigw_svc: - image: git.pbiernat.dev/egommerce/apigw-svc:latest # fixme :stable - networks: - - apigw_network - - identity_network - - basket_network - - identity_svc: - image: git.pbiernat.dev/egommerce/identity-svc:latest # fixme :stable + mongo-db: + image: mongo:5.0.14 environment: - - DATABASE_URL=postgres://PROD_IDENTITY_USER:PROD_PASS@postgres_svc:5432/PROD_DATABASE + - APP_NAME=mongo-db + - APP_DOMAIN + - MONGO_INITDB_ROOT_USERNAME=mongodb + - MONGO_INITDB_ROOT_PASSWORD + # labels: + # - "traefik.enable=true" + # - "traefik.tcp.routers.mongodb-svc.service=mongodb-svc" + # - "traefik.tcp.routers.mongodb-svc.entryPoints=mongodb" + # - "traefik.tcp.services.mongodb-svc.loadbalancer.server.port=27017" + volumes: + - mongodb_data:/data/db networks: - - identity_network - - postgres_network + - mongodb-db-network + - api-logger-network - basket_svc: - image: git.pbiernat.dev/egommerce/basket-svc:latest # fixme :stable + # API micro-services + identity-svc: + image: git.pbiernat.dev/egommerce/identity-svc:latest environment: - - DATABASE_URL=postgres://PROD_BASKET_USER:PROD_PASS@postgres_svc:5432/PROD_DATABASE + - APP_NAME=identity-svc + - APP_DOMAIN + - DATABASE_URL + - EVENTBUS_URL networks: - - basket_network - - postgres_network + - identity-svc-network + - api-eventbus-network + - api-logger-network + - postgres-db-network + - mongodb-db-network + + basket-svc: + image: git.pbiernat.dev/egommerce/basket-svc:latest + environment: + - APP_NAME=basket-svc + - APP_DOMAIN + - DATABASE_URL + - EVENTBUS_URL + networks: + - basket-svc-network + - api-eventbus-network + - api-logger-network + - postgres-db-network + - mongodb-db-network + + catalog-svc: + image: git.pbiernat.dev/egommerce/catalog-svc:latest + environment: + - APP_NAME=catalog-svc + - APP_DOMAIN + - DATABASE_URL + - EVENTBUS_URL + networks: + - catalog-svc-network + - api-eventbus-network + - api-logger-network + - postgres-db-network + - mongodb-db-network + + order-svc: + image: git.pbiernat.dev/egommerce/order-svc:latest + environment: + - APP_NAME=order-svc + - APP_DOMAIN + - DATABASE_URL + - EVENTBUS_URL + networks: + - order-svc-network + - api-eventbus-network + - api-logger-network + - postgres-db-network + - mongodb-db-network + + # Workers (EventBus) + basket-worker: + image: git.pbiernat.dev/egommerce/basket-worker:latest + environment: + - APP_NAME=basket-worker + - DATABASE_URL + - EVENTBUS_URL + networks: + - basket-worker-network + - api-eventbus-network + - api-logger-network + - postgres-db-network + - mongodb-db-network + + catalog-worker: + image: git.pbiernat.dev/egommerce/catalog-worker:latest + environment: + - APP_NAME=catalog-worker + - DATABASE_URL + - EVENTBUS_URL + networks: + - catalog-worker-network + - api-eventbus-network + - api-logger-network + - postgres-db-network + - mongodb-db-network + + order-worker: + image: git.pbiernat.dev/egommerce/order-worker:latest + environment: + - APP_NAME=order-worker + - DATABASE_URL + - EVENTBUS_URL + networks: + - order-worker-network + - api-eventbus-network + - api-logger-network + - postgres-db-network + - mongodb-db-network + +volumes: + postgres_data: ~ + mongodb_data: ~ + rabbitmq_data: ~ + rabbitmq_logs: ~ networks: - postgres_network: + api-gateway-network: driver: overlay internal: true - apigw_network: + api-registry-network: driver: overlay internal: true - identity_network: + api-eventbus-network: driver: overlay internal: true - basket_network: + api-logger-network: + driver: overlay + internal: true + + postgres-db-network: + driver: overlay + internal: true + + mongodb-db-network: + driver: overlay + internal: true + + # api micro-services networks + identity-svc-network: + driver: overlay + internal: true + + basket-svc-network: + driver: overlay + internal: true + + catalog-svc-network: + driver: overlay + internal: true + + order-svc-network: + driver: overlay + internal: true + + # Workers networks + # identity-worker-network: + # driver: overlay + # internal: true + + basket-worker-network: + driver: overlay + internal: true + + catalog-worker-network: + driver: overlay + internal: true + + order-worker-network: driver: overlay internal: true diff --git a/deploy/etc/consul/server.json b/deploy/etc/consul/server.json new file mode 100644 index 0000000..ba08340 --- /dev/null +++ b/deploy/etc/consul/server.json @@ -0,0 +1,14 @@ +{ + "node_name": "api-registry", + "server": true, + "bootstrap" : true, + "ui_config": { + "enabled" : true + }, + "data_dir": "/consul/data", + "addresses": { + "http" : "0.0.0.0" + }, + "bind_addr": "0.0.0.0", + "advertise_addr": "127.0.0.1" +} \ No newline at end of file diff --git a/deploy/stack-start.sh b/deploy/start-stack.sh similarity index 89% rename from deploy/stack-start.sh rename to deploy/start-stack.sh index 06e132d..c739cb2 100644 --- a/deploy/stack-start.sh +++ b/deploy/start-stack.sh @@ -1,5 +1,5 @@ #!/bin/sh -# RUN FORM REPO ROOT DIR +# RUN IT FORM THE REPO ROOT DIR echo "Starting egommerce stack..." docker stack deploy --with-registry-auth \ @@ -7,4 +7,5 @@ docker stack deploy --with-registry-auth \ --compose-file deploy/egommerce-stack.dev.yml \ --compose-file deploy/egommerce-stack.dev.local.yml \ egommerce + echo "Done."