Compare commits
39 Commits
Author | SHA1 | Date | |
---|---|---|---|
6848b55101 | |||
|
a856f24132 | ||
|
35dd2d38bf | ||
|
0173d65f9b | ||
b9b8a57a5b | |||
e3173eaecb | |||
ab2ec6717b | |||
7e5d3273d8 | |||
6842fedccb | |||
b0afeb3b89 | |||
574309d94c | |||
f6ea4db35e | |||
eed5458c0c | |||
59368f3660 | |||
8fba43e14c | |||
a3428542e7 | |||
24378430de | |||
|
0213ecbadf | ||
6775eeafe6 | |||
6467a60194 | |||
3ab3c7f769 | |||
0d2ff20557 | |||
f871d5e052 | |||
08e6275c50 | |||
bd38c66fda | |||
6042f81c35 | |||
317d1a871b | |||
5bd2f273a9 | |||
17c64b31f5 | |||
3db0fcf17b | |||
aa5b8bdadb | |||
dbc67e44f2 | |||
68596649d4 | |||
80e8a2ac4e | |||
047888cf47 | |||
f2efd1b141 | |||
958e04f81d | |||
b972b53d6b | |||
b1d5d5c015 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
.idea/
|
||||
|
||||
*.local.yml
|
||||
#*.local.yml
|
||||
|
173
LICENSE.md
Normal file
173
LICENSE.md
Normal file
@ -0,0 +1,173 @@
|
||||
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
|
||||
|
||||
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
|
||||
|
||||
**Using Creative Commons Public Licenses**
|
||||
|
||||
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
|
||||
|
||||
* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors).
|
||||
|
||||
* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees).
|
||||
|
||||
## Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
|
||||
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
||||
|
||||
### Section 1 – Definitions.
|
||||
|
||||
a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
||||
|
||||
b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. __BY-NC-SA Compatible License__ means a license listed at [creativecommons.org/compatiblelicenses](http://creativecommons.org/compatiblelicenses), approved by Creative Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||
|
||||
e. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
||||
|
||||
f. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
||||
|
||||
g. __License Elements__ means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike.
|
||||
|
||||
h. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
||||
|
||||
i. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License.
|
||||
|
||||
k. __NonCommercial__ means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
|
||||
|
||||
l. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
||||
|
||||
m. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
||||
|
||||
n. __You__ means the individual or entity exercising the Licensed Rights under this Public License. __Your__ has a corresponding meaning.
|
||||
|
||||
### Section 2 – Scope.
|
||||
|
||||
a. ___License grant.___
|
||||
|
||||
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
|
||||
|
||||
B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
|
||||
|
||||
2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
||||
|
||||
3. __Term.__ The term of this Public License is specified in Section 6(a).
|
||||
|
||||
4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
||||
|
||||
5. __Downstream recipients.__
|
||||
|
||||
A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
||||
|
||||
B. __Additional offer from the Licensor – Adapted Material.__ Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.
|
||||
|
||||
C. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
||||
|
||||
6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
||||
|
||||
b. ___Other rights.___
|
||||
|
||||
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
|
||||
|
||||
### Section 3 – License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
||||
|
||||
a. ___Attribution.___
|
||||
|
||||
1. If You Share the Licensed Material (including in modified form), You must:
|
||||
|
||||
A. retain the following if it is supplied by the Licensor with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||
|
||||
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
||||
|
||||
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||
|
||||
b. ___ShareAlike.___
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
|
||||
|
||||
### Section 4 – Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
||||
|
||||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
|
||||
|
||||
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
|
||||
|
||||
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
||||
|
||||
### Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__
|
||||
|
||||
b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__
|
||||
|
||||
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
### Section 6 – Term and Termination.
|
||||
|
||||
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
||||
|
||||
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
||||
|
||||
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
### Section 7 – Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
|
||||
|
||||
### Section 8 – Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
||||
|
||||
> Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
|
||||
>
|
||||
> Creative Commons may be contacted at creativecommons.org
|
20
Makefile
20
Makefile
@ -1,7 +1,23 @@
|
||||
DEPLOY_DIR := ./deploy
|
||||
|
||||
# SETTING ENV
|
||||
up:
|
||||
- sh ${DEPLOY_DIR}/start-stack.sh
|
||||
- sh ${DEPLOY_DIR}/scripts/start-docker.sh
|
||||
|
||||
down:
|
||||
- docker stack egommerce
|
||||
- docker stack rm egommerce
|
||||
|
||||
k8s-up:
|
||||
- sh ${DEPLOY_DIR}/start-k8s.sh
|
||||
|
||||
k8s-down:
|
||||
- kubectl delete -f deploy/k8s/stack.yml
|
||||
|
||||
# GENERATING CERTS
|
||||
certs:
|
||||
- bash ${DEPLOY_DIR}/scripts/gen-certs.sh
|
||||
|
||||
volumes-restart:
|
||||
- docker stack rm egommerce
|
||||
- docker volume prune -af
|
||||
- sh ${DEPLOY_DIR}/start-stack.sh
|
||||
|
24
README.md
24
README.md
@ -1,3 +1,23 @@
|
||||
# stack
|
||||
# Egommerce docker stack
|
||||
|
||||
Egommerce docker stack
|
||||
## Start
|
||||
|
||||
# $ make up
|
||||
|
||||
## Shutdown
|
||||
|
||||
# $ make down
|
||||
|
||||
# Egommerce K8S stack (currently experimental)
|
||||
|
||||
## Start
|
||||
|
||||
# $ make k8s-up
|
||||
|
||||
## Shutdown
|
||||
|
||||
# $ make k8s-down
|
||||
|
||||
## Maintenance
|
||||
|
||||
### If certificate doesn't work try to copy contents of the key file at the end of the cert file.
|
||||
|
6
deploy/.env.dist
Normal file
6
deploy/.env.dist
Normal file
@ -0,0 +1,6 @@
|
||||
API_GATEWAY_ADDR=gw.service.ego.io
|
||||
API_GATEWAY_PORT=443
|
||||
|
||||
# API_REGISTRY_ADDR=registry.service.ego.io
|
||||
API_REGISTRY_ADDR=api-registry
|
||||
API_REGISTRY_PORT=8501
|
6
deploy/.env.local
Normal file
6
deploy/.env.local
Normal file
@ -0,0 +1,6 @@
|
||||
API_GATEWAY_ADDR=gw.service.ego.io
|
||||
API_GATEWAY_PORT=443
|
||||
|
||||
# API_REGISTRY_ADDR=registry.service.ego.io
|
||||
#API_REGISTRY_ADDR=api-registry
|
||||
API_REGISTRY_PORT=8501
|
BIN
deploy/bin/register-service
Executable file
BIN
deploy/bin/register-service
Executable file
Binary file not shown.
57
deploy/bin/register-service.go
Normal file
57
deploy/bin/register-service.go
Normal file
@ -0,0 +1,57 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
addr, port := env("API_REGISTRY_ADDR", "api-registry"), env("API_REGISTRY_PORT", "8501")
|
||||
regUrl := "https://" + addr + ":" + port + "/v1/agent/service/register?replace-existing-checks=true"
|
||||
regData, err := os.ReadFile("/.app.config")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
ip := getIP()
|
||||
strRegData := string(regData)
|
||||
strRegData = strings.Replace(strRegData, "__IP__", ip, -1)
|
||||
|
||||
req, err := http.NewRequest(http.MethodPut, regUrl, strings.NewReader(strRegData))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
log.Printf(err.Error())
|
||||
log.Fatal(err)
|
||||
}
|
||||
var respBody []byte
|
||||
resp.Body.Read(respBody)
|
||||
|
||||
log.Printf("Successfully registered")
|
||||
}
|
||||
|
||||
func env(name, def string) string {
|
||||
val := os.Getenv(name)
|
||||
|
||||
if len(val) == 0 {
|
||||
return def
|
||||
}
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
func getIP() string {
|
||||
host, _ := os.Hostname()
|
||||
ips, _ := net.LookupIP(host)
|
||||
for _, ip := range ips {
|
||||
return ip.String()
|
||||
}
|
||||
|
||||
return host
|
||||
}
|
9
deploy/bin/update-resolv
Executable file
9
deploy/bin/update-resolv
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# modify /etc/resolv.conf
|
||||
registryIP=$(nslookup -type=A api-registry. | awk '/^Name:/ {c=2;N=$2} !--c {print N,$2}' | awk '{printf "%s", $2}')
|
||||
resolvFile=$(cat /etc/resolv.conf)
|
||||
|
||||
echo -e "nameserver $registryIP" >>/etc/resolv.conf
|
||||
# echo "$registryIP registry.service.ego.io" >> /etc/hosts # Add consul host with static IP (consul register itself as 127.0.0.1)
|
||||
# nslookup api-registry
|
4
deploy/certs/.gitignore
vendored
Normal file
4
deploy/certs/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
@ -1,8 +0,0 @@
|
||||
# #!/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
|
@ -1,25 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEPjCCAyagAwIBAgIUFo8gCOofwp0bxXuwlnfPbLhnIPUwDQYJKoZIhvcNAQEL
|
||||
BQAwgZoxCzAJBgNV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iYXNrZXQuYXBpLmVnb21tZXJjZS5sb2NhbDAN
|
||||
BgkqhkiG9w0BAQsFAAOCAQEAfsHGRub8wBBzmOD8TeaEMNLV17d9Qn0PYWVu8ufN
|
||||
xkIlayepb1HhG1Slo0cJIR7gpIrXm8/J6ghjX4wkLBEOXMSu5GLbRwUdQo0lXEVb
|
||||
DobGukd7wgK/52/NHkhw00AorWI0SgYvl12CVpkjhAO3Zb3W/0MdoOn+TfePvGJR
|
||||
L03a9hYRFTCf8wXAbIv/Cu9MlVeBPx1dcOIhhUr6165w89RZIfLH5tSxWAFAcnup
|
||||
wzGWlsk7Ya/gCmsPWPjZPDBQwtr/8Ar2tTlatfk4I+NlfDlzStE2fo8O58spYEFX
|
||||
ilhuWB84g880AXShqKFgY5gMKbcDUuFYJ9mTu+DjLLXpEA==
|
||||
-----END CERTIFICATE-----
|
@ -1,28 +0,0 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDRZU96lT0CrLZX
|
||||
rp5UznnQ96Hu7VvF+m0Ysl4WIaDFMRDGz8Hwl0IQv+U3HH0GQEHRLDK/LTByIh1u
|
||||
lCO/5w73J6U9WtXpiXnfYjiW5nf8Z0p4u7nlojb/7opP7Tg5cny0cNlX3vmfOh65
|
||||
x2vuJHdQa8bnvOFZKRYFFRZbL0jNHGpMij0fOhGVMnCDdnBAxnC9K7Obpj7LIh/i
|
||||
gVShxtgxu/U63kmigeIaxfP7gxmDPByNx4jBn/7OdUvm6tfc9G+3GhxBECChtAl9
|
||||
4prnZ3TGQMKWd3ATBAZxQRRDzU7vlYf8jhGCptI420K03/eRn09k8qqbETKlxZU8
|
||||
i801FMFlAgMBAAECggEAFPSpYVh1qGKeBgTm+hBG3yulNFrjTBstl2LkaR0Y8Jsi
|
||||
NW9d1qTgmvoFZ8BNX9aG77bXZkwQtN9mqCYhtMccN45rakpArbRRMtKq3Kk4eVVh
|
||||
/da1u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850UZb6sfczqTen3cn3HZejTicCwufSPKdR3UWl4ZVrMjuq
|
||||
zcyD/sy5R2TefW3Mn0q0DAysnxPzeIfCgjtiGE0CAwEAAaNqMGgwHQYDVR0OBBYE
|
||||
FMfsBu2LXupzmY+My7BFUKLByAv1MB8GA1UdIwQYMBaAFMfsBu2LXupzmY+My7BF
|
||||
UKLByAv1MA8GA1UdEwEB/wQFMAMBAf8wFQYDVR0RBA4wDIIKYmFza2V0LXN2YzAN
|
||||
BgkqhkiG9w0BAQsFAAOCAQEAkm0dM03mQzPtxfTqidPquMHrmCq/AvKCfYdpErx9
|
||||
5nw5W2Gf8vbgFUpfjswe1TTZtur4c37Ojv1FIkmgsMXKv2pBOk4uiQE3N3SvtxXz
|
||||
ZzQvZx+Spl/5BSVPOpun3RwgSMCAiIrVVtfSBhjSPxCosBGM3MqOI6GpsUeO6El7
|
||||
ou5R6iX7whLEwQSes17oZUsfy4Jw2KtowGc5gr3baDJXP6CkJglpNAHofYMDphFU
|
||||
wd1wVc+iX99t3fKgRs91ho1kdgwGkFcujGhiv8dJSsybUcQPbROtAKit8+9acH08
|
||||
cuTlGTDFFw8R+zkHfSDxXAjChI3yoAAiPLliNIqyrZD8TQ==
|
||||
-----END CERTIFICATE-----
|
@ -1,28 +0,0 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC8CN3WD+bRa4Ix
|
||||
5teDZN+7wfyaUQtBBxatCJNIG26ntdIpFgp1PcarcofXRg6wVnCQi+FSWR1dRrq0
|
||||
1EWWaNZxMQK60arVmWPrZkES34OQFe1EDuylc4XXxZbYlomwY1TuXLnry4m9TuWF
|
||||
Nu2Y0Qdh9kwY2lkuQs7NvhHur2Wn16xsGbu5eySHhIM/ZlYJQDTpI2r8HbztJdfG
|
||||
hgx00HNUGKQiPLLN0zi5gQkkze8BEhfJIkRgLEw6dAFQpulVP9/OdFGW+rH3M6k3
|
||||
p93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0Y2Ieq4jFLPBwDPb44dKPj6Ugt6FR45RtYFxC
|
||||
PX0aNU7fPUX634tRs00VCcDw490TIUlSfVMMtfVKVh3CHJt1+1rNQ35XEM0LWkpO
|
||||
cwGx4u4msiYQfDhS4PwaoLUq3RVnxEUdxa8IynECgYB1Q8rMdRuMBvsMCfvBsHxw
|
||||
FJKxWuUI66UWfpsfS8UTcU1hW6o7rT/Yqbyp/NsYjFAvGVQ9iE9SEulbUojHgyF5
|
||||
oj+mI188r6ub30vEttzRtkfBMyyohI/asT4imchQfItjIWFjLqRJVS3hZhHzkcYr
|
||||
9fhQI53HXpva0T49Luycyg==
|
||||
-----END PRIVATE KEY-----
|
@ -1,25 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEQTCCAymgAwIBAgIUZluuWCa5dtAgTvolk7IRjBapGTEwDQYJKoZIhvcNAQEL
|
||||
BQAwgZsxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0
|
||||
b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJjZTEMMAoGA1UECwwDZGV2MSQwIgYDVQQD
|
||||
DBtjYXRhbG9nLmFwaS5lZ29tbWVyY2UubG9jYWwxITAfBgkqhkiG9w0BCQEWEnJv
|
||||
b3RAZWdvbW1lcmNlLmRldjAeFw0yMjExMjUwMzU4NDdaFw0yMzExMjUwMzU4NDda
|
||||
MIGbMQswCQYDVQQGEwJQTDEOMAwGA1UECAwFU2xhc2sxETAPBgNVBAcMCEthdG93
|
||||
aWNlMRIwEAYDVQQKDAllZ29tbWVyY2UxDDAKBgNVBAsMA2RldjEkMCIGA1UEAwwb
|
||||
Y2F0YWxvZy5hcGkuZWdvbW1lcmNlLmxvY2FsMSEwHwYJKoZIhvcNAQkBFhJyb290
|
||||
QGVnb21tZXJjZS5kZXYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9
|
||||
PsaReVh3dNN2KSaPFAI8FLraToXVu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+aUspxtwGZq26gf8nB3oA
|
||||
I1l3rucME0LvLvZ9TbjK1T+rwUVRQzsvNaK3pHugewo8STOa4w==
|
||||
-----END CERTIFICATE-----
|
@ -1,28 +0,0 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC36QqvDOFoma5z
|
||||
Cl3+/VvqD8EpxqaSd6gIBehI7+sh0KGAU0TySeeUOyefpFmjhZJEdrck747vWWNn
|
||||
3l3yGL/EnUHHhbFUbbGlX+Fgiv0L7DL4Rb/kNaerqP7WJA0qHtN34FzsAY3UXdCu
|
||||
3Aw7PBqwwEe97FbXqC02ChaATlHrCZ8ut209420l/tvh87xI7dORqRUNlrI0m/gn
|
||||
Og5Nl+3lh0B+P14Rc38gFlNfpozb9mpBiyNG55gYPX4tUXiyBmzeFHyakkcA1T6n
|
||||
4onRDlutH/Wwo+wn7/0NzshJUTFCq5YzOupDFpKX8hIZ+3ijno2YcUHxc1pIUgrl
|
||||
7plZenFRAgMBAAECggEAGv12de47/m/fbD6vQMbKAHXDcXAX7hLldBf52QpsxY+q
|
||||
w/x0d+JkvBpaXFFwXlEyAB40DpWhsnq53fqCaw86xY4Wo0N5nNxkX9LMbrC3JlLJ
|
||||
wCnsWX+OVeD9VUwBKpdPjZ49xN0NhYcnIyJkISVW/W2amcLfk9K4n9+nIblcyFNn
|
||||
YGm4aT+lLEn4rfj708lEsm27C6UUXxWO8GhihXs3r13NO72KCCkRtUP7LfBHcoSt
|
||||
O+AS3tTt8/r1Ac7YYgCSG+DC+kaaCVlTIgSY75i8fnVjq5DeBYm9e9JTqJvy3XN8
|
||||
Vo6M6WYqf4hQWFsrPdW8uvMihoOcBv9mc4ASMStxiQKBgQDluwox7ml+dnMHUhqn
|
||||
xTuqoEkQW8a1TRulpt7qxyMCWyRANacrAtun5gJ9M31pXbMFgk3lfjErIK8miLhW
|
||||
g2fwyuPgBMV7a3qMYL+fpZC5/s6iSTLkbVM42s4o9cMYnQs2ioej9jQGMTVUteBn
|
||||
e+cQ9co6aBF+HjOguyAES5QSjwKBgQDM8LFqSjRl7jmPCljmLke7tzuRP2kIqh/4
|
||||
DvySQSdT6nykyY8MoWHCTBQk6DImxcComuYvR8lNe1aHABxLvCRB7phk7bMg3WVv
|
||||
zoQzQRy+gG75M3inT/BQ2pYrTj3+azhOyGdgtJvAJv7ArHaIbLwMxgDLjUPEx2LH
|
||||
/nMU/qGuHwKBgCW9/+PKJnzHWwiV3Zk4lx/mK3rLiS7aFzO04aSyyLanYKJH7knr
|
||||
s0i3SitlnTIFWdcK3F9axxstyHjNN3PHLPlra9qvDf7D3qNXdcP1wHw+N5aD7h+H
|
||||
MogBsqMaFU5i5qe0RKqUVWG7Deb35oE54vFvYCUOWeldbt/2PkFWZWJTAoGACkaP
|
||||
PrsVwX6eWDO2nWP4qMrZK8E4LP0KuU9XDqZBqI17Tm/kwkddNXbHE8qoqRUFQe7y
|
||||
V7CLwVzLy90PjiSS1NN3xKe+cYloSqDaNA+xt0ONTOVtyUXS0NsE6Ir1xMnvetPF
|
||||
iy3DGXFbGKINF24MR7+tzob4vOcaZti1QHo79RUCgYEA3hl+Xsi9gY1qq7V96upR
|
||||
cqk5PIAfyXDr11Um5ofyEy/tR0w/0uneE6gKyDwnxXfvx12KoK83Kegrr8uoAy7d
|
||||
JpaZL9wr9rYIQuFKz7mI6OwDgonSpqjBYnGKy9BufXRFi22/HuLsDJy0MSw9RuPH
|
||||
cUBXLla2AkboPDIMp/ShMbY=
|
||||
-----END PRIVATE KEY-----
|
@ -1,25 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIERDCCAyygAwIBAgIUIFd8OBJAUAjPahyz/aZ/hYwceNAwDQYJKoZIhvcNAQEL
|
||||
BQAwgZwxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0
|
||||
b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJ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EOpSwcYx24pjk4x
|
||||
jfLZmDvVcoMqJ8G4xRmzc2bRmFnbwW3VJy1RNQYdLwEqSxxBFHELR4fxCX4EQnnm
|
||||
7L4E0AK57in9IPQ9GOV8ChaBudO5SDMvmU+gs51KVuxOLAX2uuuOwleMLtQjNCt1
|
||||
M55WOGgFvqOIDnX61ZXBZk9fWKVz0AICbZxheY9PhCJwonDS8YVgHlIdC0jdEwEt
|
||||
ruT21LeYSdfZp68YtDkkiya25oBIMUwWBlWRvZ+a+R8GF/9/beNfeNJUEkq0dCdE
|
||||
yAHBdtICk+Y4ERrHDDu/cDRjKHIf8cE7USCmh99X7Qq8ySi+J8QRrw==
|
||||
-----END CERTIFICATE-----
|
@ -1,28 +0,0 @@
|
||||
-----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/orh1An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vXAgMBAAGjbDBqMB0GA1Ud
|
||||
DgQWBBS+0M5DVzerz6jP1A1klem9Q1kaITAfBgNVHSMEGDAWgBS+0M5DVzerz6jP
|
||||
1A1klem9Q1kaITAPBgNVHRMBAf8EBTADAQH/MBcGA1UdEQQQMA6CDGlkZW50aXR5
|
||||
LXN2YzANBgkqhkiG9w0BAQsFAAOCAQEAoa9LGp3npLp9Xt0BvFsgx7J8sqeuf1zT
|
||||
jBR65lQojF4KWxOACWAoXlz4NMapQskQ0axc8eoVm4dK1hF2KzNTnDk8E1YSk0/E
|
||||
lXzRiirjPjSsrI4lITOmOTbLfmFqR69Q/zYfKts3aJDKEkqKMpvVy8KxME78WmKx
|
||||
VylBlMTnPnvUyXbpk9C2Cc20/NwPtekVdu/51OIqhZdCBxq7GtLyljmeME0YYZOB
|
||||
nxqeZqaJD8kZXVpWWYiiOSHD4PBPuGjZiCr48bgCGAroiCT+Z+Qyr7BGdV2W+aVl
|
||||
+S7we06Bc/beG/DMawjYdyP2l8Q+nVF4Vnve3banXWRKxLTbYspEyA==
|
||||
-----END CERTIFICATE-----
|
@ -1,28 +0,0 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDXH8e1C+BmDrv/
|
||||
5lp25jbgOzGUkLvp85W6VOyMxLne1rOPmSljFj2zIjF5WIEXGsUa+D9HYdRw5+5W
|
||||
yDrmXx6esEjY1Uft31A4ec5uzIVz0G5wXlPBmwXv6U4asEowvPLLR96Va+zyIGKw
|
||||
srB8dHo+LYtKCHMbW2ntCVqz6LpsqHxYwJ66kfBz9B+25CJmRk5c3YnGDCr3ArUY
|
||||
KQi4PCU8rf3bMWft1iPjT3vAMniWnnDWS0KYtPV3VcRyUwCXRJrKMczmEcfsu1eb
|
||||
2nofNtlH0AXDx70g0LtemciMk+nUB75d3d8LOAvccV1+L7IbTvhgqXypgK+tzXvG
|
||||
r5kwPjvXAgMBAAECggEAD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Lbq7vg5
|
||||
6lEBccaMjZfJvmFMxFzrYcJ6uiS9RmWEiZGaX5GNAoGBAM7FDXUw35VxdC5yAfnR
|
||||
9c1uWpbzZ4D/GDRrVA7T7iu2AWiUtAyDrqhnLUcDuRedxgZlBhZs1rGNVK5ZsinJ
|
||||
ogRruDRcUw1mv0mRzo2JGGLAUsG7p8qJkjRAUrN8u/6Jm8VVDuQS6GzByI0/wKqR
|
||||
FARhzIKCJ2l6Q/xWd/RIfwaS
|
||||
-----END PRIVATE KEY-----
|
@ -1,36 +0,0 @@
|
||||
# #!/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
|
@ -1,60 +0,0 @@
|
||||
# #!/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"
|
@ -1,25 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEOzCCAyOgAwIBAgIUNTc01c06pmV6uK6obJcn3LmDWNgwDQYJKoZIhvcNAQEL
|
||||
BQAwgZkxCzAJBgNVBAYTAlBMMQ4wDAYDVQQIDAVTbGFzazERMA8GA1UEBwwIS2F0
|
||||
b3dpY2UxEjAQBgNVBAoMCWVnb21tZXJjZTEMMAoGA1UECwwDZGV2MSIwIAYDVQQD
|
||||
DBlvcmRlci5hcGkuZWdvbW1lcmNlLmxvY2FsMSEwHwYJKoZIhvcNAQkBFhJyb290
|
||||
QGVnb21tZXJjZS5kZXYwHhcNMjIxMTI3MDI1MjU4WhcNMjMxMTI3MDI1MjU4WjCB
|
||||
mTELMAkGA1UEBhMCUEwxDjAMBgNVBAgMBVNsYXNrMREwDwYDVQQHDAhLYXRvd2lj
|
||||
ZTESMBAGA1UECgwJZWdvbW1lcmNlMQwwCgYDVQQLDANkZXYxIjAgBgNVBAMMGW9y
|
||||
ZGVyLmFwaS5lZ29tbWVyY2UubG9jYWwxITAfBgkqhkiG9w0BCQEWEnJvb3RAZWdv
|
||||
bW1lcmNlLmRldjCCASIwDQYJKoZIhvc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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
|
||||
Nzm2jUKY3OyjyArN35Zkoay7yR8uOqQbZzGOTeWiHLlQFStK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iv
|
||||
p5PIv3B3XwFXQNeCcdS3doPZx6quAmEk9HcfA31BMIuVAW66Hv1l2jS0/Hk0VTwB
|
||||
3XaYTzBMQCTKznvTm0h889N3QPZcXfyJcd1SkRMT0w==
|
||||
-----END CERTIFICATE-----
|
@ -1,28 +0,0 @@
|
||||
-----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/L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Ahb2YINIv
|
||||
ls6PV9r6+47aFJSTaLqWLURsB96kaJJ5cnIbRflyKhxNvnwm45I8h86YW8rRsX74
|
||||
TIcCGFzqgvicf5gDkKWojUyURvql5JKGGw+JQsTohu2kiQ7wPuEPDVFo8oJzte+Q
|
||||
LFsz/7murkq7XoRJAzOuv9QwFDNJ8kB7f/WMHCThW5vJioo4Sb1aobTOFJR/NbgQ
|
||||
YHBSlnGbcVUlwq1nfyqsLgqJmz23af8bbd4/8qnBvxx5o7suDGSrBHF1TIEyfMvq
|
||||
U9RbOrGkcIlCgVfLUsmmjBwwqrICuzvkMIddyJvYJO3Vp1wGkqUhCOSLDTaG7OtJ
|
||||
JQ4xbsIsgorbBQ==
|
||||
-----END CERTIFICATE-----
|
@ -1,28 +0,0 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEugIBADANBgkqhkiG9w0BAQEFAASCBKQwggSgAgEAAoIBAQDofql0egapsaqJ
|
||||
Du+xSzpteljskHlZ8qulXU4BBmU6mxBGqOnC0s3xRJQrcEzAF1Ep5T9DlFam3TGn
|
||||
bYwByOpdap/bA6eAmShRnpKac+6OsFIVTL6o4Jn2ib79B2M6u+E+7Jmgb28BIDce
|
||||
BT4ESm4rdzpHtl2OZLl6yPnw9VkIw+mojMqxK2k+VzExYOpzAnSj4Cvo3ZRW01vT
|
||||
JInd0xNspsXsFwPcl4carWuHfr7eMlqlsPjuSj9FXQeqbobm6S0X0d8kPlnasbbx
|
||||
/gEV9zbktspp3+qzi7zk7D84M0nNq+B9WmXzfBRAYsywYkGZ7Y5ajfoiKlqQqdSi
|
||||
e7VwhuAbAgMBAAECggEAcjsJdzkdXPL2HzE/g5S6uF+MoW66sP8SZsVZNhe2VP0r
|
||||
GgyUDi0VEp3nTxB2JUtPjY4db07K5GF5rBGe4KGexRdGQ42gFwcpUDDhRxH+/AyV
|
||||
x/FVHBR+kStMs3WVw53cJdaKBNG7cIoriox41BLd3m1OLT3k6bmDiFiGtWVWwX7Q
|
||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VMZjDQ1R2i3l2uUdLsPO
|
||||
WLv5W07CDL6jOpTAveHpyJP6xCToJJ5rIOjJAuiyAZuZpUZuG3zXistWAZQbj6MV
|
||||
pKAJLwDHe3UggxNuJiTOBNkKHmGuKmoWkc0iO9UCgYAXXXleC4Ok06nwzFdgvRb4
|
||||
LQVZdUYRCEpZamhfdBWFU+o1gJJIk5edBPcAFJZ4w0FVDGqw2UCV9dzqaigttsNT
|
||||
N7FU5vAhh9QIAo9TLp2ZiwzCdHdYf+rUiYkemS0X8T/Q1xdj1u6gIkJNGrko7kXD
|
||||
PSQKup9IJi8n/jH9arle4A==
|
||||
-----END PRIVATE KEY-----
|
@ -1,9 +0,0 @@
|
||||
-- TODO: Add variables for db, user name, etc...
|
||||
|
||||
CREATE DATABASE svc_identity
|
||||
WITH
|
||||
OWNER = postgres
|
||||
ENCODING = 'UTF8'
|
||||
CONNECTION LIMIT = -1;
|
||||
|
||||
GRANT ALL ON DATABASE svc_identity TO postgres;
|
@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS basket.basket_item;
|
||||
DROP TABLE IF EXISTS basket.basket;
|
@ -0,0 +1,34 @@
|
||||
CREATE TABLE IF NOT EXISTS basket.basket
|
||||
(
|
||||
id uuid NOT NULL DEFAULT gen_random_uuid(),
|
||||
"state" character varying NOT NULL DEFAULT 'new',
|
||||
created_at timestamp without time zone NOT NULL DEFAULT now(),
|
||||
updated_at timestamp without time zone,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS basket.basket_item
|
||||
(
|
||||
id uuid NOT NULL DEFAULT gen_random_uuid(),
|
||||
basket_id uuid NOT NULL,
|
||||
product_id integer NOT NULL,
|
||||
quantity integer NOT NULL DEFAULT 1,
|
||||
price double precision NOT NULL DEFAULT 0.00,
|
||||
created_at timestamp without time zone NOT NULL DEFAULT now(),
|
||||
updated_at timestamp without time zone,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
ALTER TABLE IF EXISTS basket.basket_item
|
||||
ADD CONSTRAINT basket_item_basket_fkey FOREIGN KEY (basket_id)
|
||||
REFERENCES basket.basket (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION
|
||||
ON DELETE NO ACTION
|
||||
NOT VALID;
|
||||
|
||||
ALTER TABLE IF EXISTS basket.basket
|
||||
OWNER to postgres;
|
||||
|
||||
ALTER TABLE IF EXISTS basket.basket_item
|
||||
OWNER to postgres;
|
||||
-- TODO ^^ PRIVILEGES...
|
@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS catalog.product;
|
@ -0,0 +1,16 @@
|
||||
CREATE TABLE catalog.product
|
||||
(
|
||||
id integer NOT NULL GENERATED ALWAYS AS IDENTITY,
|
||||
pid uuid NOT NULL DEFAULT gen_random_uuid(),
|
||||
"name" character varying NOT NULL,
|
||||
price double precision NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL DEFAULT now(),
|
||||
updated_at timestamp without time zone,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
ALTER TABLE IF EXISTS catalog.product
|
||||
OWNER to postgres;
|
||||
|
||||
COMMENT ON COLUMN catalog.product.pid
|
||||
IS 'Unique product ID. EAN, UPC etc...';
|
@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS identity.users;
|
@ -0,0 +1,12 @@
|
||||
CREATE TABLE IF NOT EXISTS identity.users
|
||||
(
|
||||
id uuid NOT NULL DEFAULT gen_random_uuid(),
|
||||
username character varying NOT NULL,
|
||||
email character varying NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL DEFAULT now(),
|
||||
updated_at timestamp without time zone,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
ALTER TABLE IF EXISTS identity.users
|
||||
OWNER to postgres;
|
6
deploy/db_migrations/init/init.sql
Normal file
6
deploy/db_migrations/init/init.sql
Normal file
@ -0,0 +1,6 @@
|
||||
CREATE USER egommerce;
|
||||
CREATE DATABASE egommerce;
|
||||
|
||||
GRANT ALL PRIVILEGES ON DATABASE egommerce TO egommerce;
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
|
@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS "ordering".order_item;
|
||||
DROP TABLE IF EXISTS "ordering"."order";
|
@ -0,0 +1,34 @@
|
||||
CREATE TABLE IF NOT EXISTS "ordering"."order"
|
||||
(
|
||||
id uuid NOT NULL DEFAULT gen_random_uuid(),
|
||||
"state" character varying NOT NULL DEFAULT 'new',
|
||||
created_at timestamp without time zone NOT NULL DEFAULT now(),
|
||||
updated_at timestamp without time zone,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "ordering".order_item
|
||||
(
|
||||
id uuid NOT NULL DEFAULT gen_random_uuid(),
|
||||
order_id uuid NOT NULL,
|
||||
product_id integer NOT NULL,
|
||||
quantity integer NOT NULL DEFAULT 1,
|
||||
price double precision NOT NULL DEFAULT 0.00,
|
||||
created_at timestamp without time zone NOT NULL DEFAULT now(),
|
||||
updated_at timestamp without time zone,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
ALTER TABLE IF EXISTS "ordering".order_item
|
||||
ADD CONSTRAINT order_item_order_fkey FOREIGN KEY (order_id)
|
||||
REFERENCES "ordering"."order" (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION
|
||||
ON DELETE NO ACTION
|
||||
NOT VALID;
|
||||
|
||||
ALTER TABLE IF EXISTS "ordering"."order"
|
||||
OWNER to postgres;
|
||||
|
||||
ALTER TABLE IF EXISTS "ordering".order_item
|
||||
OWNER to postgres;
|
||||
-- TODO ^^ PRIVILEGES...
|
@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS pricing.price;
|
@ -0,0 +1,9 @@
|
||||
CREATE TABLE IF NOT EXISTS pricing."price"
|
||||
(
|
||||
id uuid NOT NULL DEFAULT gen_random_uuid()
|
||||
);
|
||||
|
||||
ALTER TABLE IF EXISTS "pricing"."price"
|
||||
OWNER to postgres;
|
||||
|
||||
-- TODO ^^ PRIVILEGES...
|
179
deploy/docker/stack.dev.local.yml
Normal file
179
deploy/docker/stack.dev.local.yml
Normal file
@ -0,0 +1,179 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
api-registry:
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- CONSUL_HTTP_TOKEN=784746ec-0d5d-fb12-1a79-95f912dcaabd
|
||||
- VAULT_TOKEN=hvs.dZL3N8PAozQ7EbOYFFDeipui # ROOT TOKEN
|
||||
# - VAULT_TOKEN=hvs.CAESICxuTO_JieCbpMoZ4_qOPIohxSKim_4V8t11JLg93RtKGh4KHGh2cy5VUUFqUm5CdTQ3V3hMQ3BHSDB4dThNZHE
|
||||
volumes:
|
||||
- ../certs/api-registry/api-registry.crt:/etc/certs/registry.local.crt:ro
|
||||
# - ../certs/ca/vault-root.pem:/usr/local/share/ca-certificates/vaultCA.pem:ro
|
||||
|
||||
api-gateway:
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- CONSUL_HTTP_TOKEN=784746ec-0d5d-fb12-1a79-95f912dcaabd
|
||||
- VAULT_TOKEN=hvs.dZL3N8PAozQ7EbOYFFDeipui # ROOT TOKEN
|
||||
# - VAULT_TOKEN=hvs.CAESICxuTO_JieCbpMoZ4_qOPIohxSKim_4V8t11JLg93RtKGh4KHGh2cy5VUUFqUm5CdTQ3V3hMQ3BHSDB4dThNZHE
|
||||
volumes:
|
||||
- ../certs/api-gateway/api-gateway.crt:/etc/certs/gateway.local.crt:ro
|
||||
# - ../certs/ca/vault-root.pem:/usr/local/share/ca-certificates/vaultCA.pem:ro
|
||||
|
||||
api-vault:
|
||||
env_file: ../.env.local
|
||||
# command: ["vault", "server", "-dev", "-dev-tls", "-dev-listen-address=0.0.0.0:8200", "-dev-root-token-id=dev-vault-token"]
|
||||
environment:
|
||||
- CONSUL_HTTP_TOKEN=784746ec-0d5d-fb12-1a79-95f912dcaabd
|
||||
- VAULT_TOKEN=hvs.dZL3N8PAozQ7EbOYFFDeipui # ROOT TOKEN
|
||||
# - VAULT_TOKEN=hvs.CAESICxuTO_JieCbpMoZ4_qOPIohxSKim_4V8t11JLg93RtKGh4KHGh2cy5VUUFqUm5CdTQ3V3hMQ3BHSDB4dThNZHE
|
||||
volumes:
|
||||
- ../certs/api-vault/api-vault.crt:/etc/certs/vault.crt:ro
|
||||
# - ../certs/ca/vault-root.pem:/usr/local/share/ca-certificates/vaultCA.pem:ro
|
||||
ports:
|
||||
- 48250:8200
|
||||
|
||||
api-eventbus:
|
||||
env_file: ../.env.local
|
||||
volumes:
|
||||
- ../certs/api-eventbus/api-eventbus.crt:/etc/certs/eventbus.local.crt:ro
|
||||
# - ../certs/api-eventbus/eventbus.key:/etc/certs/eventbus.local.key:ro
|
||||
labels:
|
||||
- traefik.tcp.routers.eventbus.rule=HostSNI(`esb.service.ego.io`)
|
||||
ports:
|
||||
- 48200:15672
|
||||
- 48201:5672
|
||||
|
||||
api-cache:
|
||||
env_file: ../.env.local
|
||||
command: ["redis-server", "/etc/redis.conf", "--requirepass", "12345678"]
|
||||
ports:
|
||||
- 48300:6379
|
||||
|
||||
api-logger:
|
||||
env_file: ../.env.local
|
||||
ports:
|
||||
- 48400:24224
|
||||
|
||||
# api-prometheus:
|
||||
# ports:
|
||||
# - 9090:9090
|
||||
|
||||
# api-grafana:
|
||||
# ports:
|
||||
# - 3000:3000
|
||||
|
||||
db-postgres:
|
||||
env_file: ../.env.local
|
||||
ports:
|
||||
- 48500:5432
|
||||
|
||||
# db-mongo:
|
||||
# env_file: ../.env.local
|
||||
# environment:
|
||||
# - APP_DOMAIN=mongodb.egommerce.local # FIXME
|
||||
# ports:
|
||||
# - 48600:27017
|
||||
|
||||
identity-svc:
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 0
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
# - EVENTBUS_URL=amqp://guest:guest@esb.service.ego.io:5672
|
||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
||||
ports:
|
||||
- 48780:443
|
||||
|
||||
catalog-svc:
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
||||
ports:
|
||||
- 48781:443
|
||||
|
||||
basket-svc:
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 0
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
||||
ports:
|
||||
- 48782:443
|
||||
|
||||
order-svc:
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 0
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
||||
ports:
|
||||
- 48783:443
|
||||
|
||||
pricing-svc:
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 0
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
||||
ports:
|
||||
- 48784:443
|
||||
|
||||
# Workers (EventBus)
|
||||
basket-worker:
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 0
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
||||
|
||||
catalog-worker:
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 0
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
||||
|
||||
pricing-worker:
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 0
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
||||
|
||||
order-worker:
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 0
|
||||
env_file: ../.env.local
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgres-db:5432/egommerce
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
- EVENTBUS_URL=amqp://guest:guest@api-eventbus:5672
|
126
deploy/docker/stack.dev.yml
Normal file
126
deploy/docker/stack.dev.yml
Normal file
@ -0,0 +1,126 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
api-registry:
|
||||
image: git.ego.cloudns.be/egommerce/api-registry:dev
|
||||
environment:
|
||||
- APP_DOMAIN=registry.service.ego.io
|
||||
# - VAULT_API_ADDR=https://api-vault:8200
|
||||
# - ENVOY_VERSION_STRING=1.26.3
|
||||
ports:
|
||||
- 48100:8501
|
||||
|
||||
api-gateway:
|
||||
image: git.ego.cloudns.be/egommerce/api-registry:dev
|
||||
environment:
|
||||
- APP_DOMAIN=gw.service.ego.io
|
||||
# - ENVOY_VERSION_STRING=1.26.3
|
||||
ports:
|
||||
- 48101:8501
|
||||
- 48443:8443 # consul & envoy api gateway port
|
||||
|
||||
api-vault:
|
||||
image: git.ego.cloudns.be/egommerce/api-vault:dev
|
||||
environment:
|
||||
- APP_DOMAIN=vault.service.ego.io
|
||||
- CONSUL_HTTP_ADDR=https://api-registry:8501
|
||||
|
||||
api-eventbus:
|
||||
image: git.ego.cloudns.be/egommerce/api-eventbus:dev
|
||||
environment:
|
||||
- APP_DOMAIN=esb.service.ego.io
|
||||
# - RABBITMQ_NODENAME=api-eventbus
|
||||
# - RABBITMQ_USE_LONGNAME=true
|
||||
# - RABBITMQ_DEFAULT_USER = admin
|
||||
# - RABBITMQ_DEFAULT_PASS = passw123
|
||||
|
||||
api-cache:
|
||||
image: git.ego.cloudns.be/egommerce/api-cache:dev
|
||||
environment:
|
||||
- APP_DOMAIN=cache.service.ego.io
|
||||
- PASSWORD=12345678
|
||||
|
||||
api-logger:
|
||||
image: git.ego.cloudns.be/egommerce/api-logger:dev
|
||||
environment:
|
||||
- APP_DOMAIN=logger.service.ego.io
|
||||
|
||||
# api-prometheus:
|
||||
# image: prom/prometheus:latest # FIXME: create private image(prod/dev)...
|
||||
# environment:
|
||||
# - APP_DOMAIN=prometheus.service.ego.io
|
||||
|
||||
# api-grafana:
|
||||
# image: grafana/grafana-oss:latest # FIXME: create private image(prod/dev)...
|
||||
# environment:
|
||||
# - APP_DOMAIN=grafana.service.ego.io
|
||||
|
||||
db-postgres:
|
||||
image: git.ego.cloudns.be/egommerce/db-postgres:dev
|
||||
environment:
|
||||
- APP_DOMAIN=postgresdb.service.ego.io
|
||||
- POSTGRESQL_PASSWORD=12345678
|
||||
|
||||
# db-mongo:
|
||||
# environment:
|
||||
# - MONGO_INITDB_ROOT_PASSWORD=12345678
|
||||
|
||||
# API micro-services
|
||||
identity-svc:
|
||||
image: git.ego.cloudns.be/egommerce/identity-svc:dev
|
||||
environment:
|
||||
# - SERVER_ADDR=basket.service.ego.io
|
||||
- APP_DOMAIN=identity.service.ego.io
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
|
||||
catalog-svc:
|
||||
image: git.ego.cloudns.be/egommerce/catalog-svc:dev
|
||||
environment:
|
||||
# - REGISTRY_USE_DOMAIN_OVER_IP=false
|
||||
- APP_DOMAIN=catalog.service.ego.io
|
||||
- AUTH_HANDLER_URL=https://identity.service.ego.io/api/v1/traefik
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
|
||||
basket-svc:
|
||||
image: git.ego.cloudns.be/egommerce/basket-svc:dev
|
||||
environment:
|
||||
- APP_DOMAIN=basket.service.ego.io
|
||||
- AUTH_HANDLER_URL=https://identity.service.ego.io/api/v1/traefik
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
|
||||
order-svc:
|
||||
image: git.ego.cloudns.be/egommerce/order-svc:dev
|
||||
environment:
|
||||
- APP_DOMAIN=order.service.ego.io
|
||||
- AUTH_HANDLER_URL=https://identity.service.ego.io/api/v1/traefik
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
# volumes:
|
||||
# - ../etc/resolv.conf:/etc/resolv.conf
|
||||
|
||||
pricing-svc:
|
||||
image: git.ego.cloudns.be/egommerce/pricing-svc:dev
|
||||
environment:
|
||||
- APP_DOMAIN=pricing.service.ego.io
|
||||
- AUTH_HANDLER_URL=https://identity.service.ego.io/api/v1/traefik
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
|
||||
# Workers (Eventbus)
|
||||
basket-worker:
|
||||
image: git.ego.cloudns.be/egommerce/basket-worker:dev
|
||||
environment:
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
|
||||
catalog-worker:
|
||||
image: git.ego.cloudns.be/egommerce/catalog-worker:dev
|
||||
environment:
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
|
||||
pricing-worker:
|
||||
image: git.ego.cloudns.be/egommerce/pricing-worker:dev
|
||||
environment:
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
||||
|
||||
order-worker:
|
||||
image: git.ego.cloudns.be/egommerce/order-worker:dev
|
||||
environment:
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongo-db:27017
|
142
deploy/docker/stack.prod.yml
Normal file
142
deploy/docker/stack.prod.yml
Normal file
@ -0,0 +1,142 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
api-registry:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/api-registry:prod
|
||||
environment:
|
||||
- APP_DOMAIN=registry.service.ego.io
|
||||
|
||||
api-gateway:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/api-registry:prod
|
||||
environment:
|
||||
- APP_DOMAIN=gw.service.ego.io
|
||||
|
||||
api-vault:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/api-vault:prod
|
||||
command: ["vault", "server", "-config=/vault/config/server.hcl"]
|
||||
environment:
|
||||
- APP_DOMAIN=vault.service.ego.io
|
||||
- VAULT_ADDR=https://localhost:8200
|
||||
# - VAULT_API_ADDR=https://localhost:8200
|
||||
|
||||
api-eventbus:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/api-eventbus:prod
|
||||
environment:
|
||||
- APP_DOMAIN=esb.service.ego.io
|
||||
|
||||
api-cache:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/api-cache:prod
|
||||
environment:
|
||||
- APP_DOMAIN=cache.service.ego.io
|
||||
|
||||
api-logger:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/api-logger:prod
|
||||
environment:
|
||||
- APP_DOMAIN=logger.service.ego.io
|
||||
|
||||
# api-prometheus:
|
||||
# image: prom/prometheus:prod # FIXME: create private image(prod/dev)...
|
||||
# user: root
|
||||
# environment:
|
||||
# - APP_NAME=api-prometheus
|
||||
|
||||
# api-grafana:
|
||||
# image: grafana/grafana-oss:prod # FIXME: create private image(prod/dev)...
|
||||
# environment:
|
||||
# - APP_NAME=api-grafana
|
||||
|
||||
db-postgres:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/db-postgres:prod
|
||||
environment:
|
||||
- APP_DOMAIN=postgresdb.service.ego.io
|
||||
- POSTGRESQL_USERNAME=egommerce
|
||||
- POSTGRESQL_DATABASE=egommerce
|
||||
|
||||
# db-mongo:
|
||||
# env_file: ../.env.prod
|
||||
# environment:
|
||||
# - APP_NAME=db-mongo
|
||||
# - APP_DOMAIN=mongo-db.service.ego.io
|
||||
# - MONGO_INITDB_ROOT_USERNAME=mongodb
|
||||
|
||||
# API micro-services
|
||||
identity-svc:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/identity-svc:prod
|
||||
environment:
|
||||
- APP_DOMAIN=identity.service.ego.io
|
||||
- APP_PATH_PREFIX=/identity
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgresdb.service.ego.io:5432/egommerce
|
||||
- EVENTBUS_URL=amqp://guest:guest@esb.service.ego.io:5672
|
||||
|
||||
catalog-svc:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/catalog-svc:prod
|
||||
environment:
|
||||
- APP_DOMAIN=catalog.service.ego.io
|
||||
- APP_PATH_PREFIX=/catalog
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgresdb.service.ego.io:5432/egommerce
|
||||
- EVENTBUS_URL=amqp://guest:guest@esb.service.ego.io:5672
|
||||
|
||||
basket-svc:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/basket-svc:prod
|
||||
environment:
|
||||
- APP_DOMAIN=basket.service.ego.io
|
||||
- APP_PATH_PREFIX=/basket
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgresdb.service.ego.io:5432/egommerce
|
||||
- EVENTBUS_URL=amqp://guest:guest@esb.service.ego.io:5672
|
||||
|
||||
pricing-svc:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/pricing-svc:prod
|
||||
environment:
|
||||
- APP_DOMAIN=pricing.service.ego.io
|
||||
- APP_PATH_PREFIX=/pricing
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgresdb.service.ego.io:5432/egommerce
|
||||
- EVENTBUS_URL=amqp://guest:guest@esb.service.ego.io:5672
|
||||
|
||||
order-svc:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/order-svc:prod
|
||||
environment:
|
||||
- APP_DOMAIN=order.service.ego.io
|
||||
- APP_PATH_PREFIX=/order
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgresdb.service.ego.io:5432/egommerce
|
||||
- EVENTBUS_URL=amqp://guest:guest@esb.service.ego.io:5672
|
||||
|
||||
# Workers (Eventbus)
|
||||
basket-worker:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/basket-worker:prod
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgresdb.service.ego.io:5432/egommerce
|
||||
- EVENTBUS_URL=amqp://guest:guest@esb.service.ego.io:5672
|
||||
|
||||
catalog-worker:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/catalog-worker:prod
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgresdb.service.ego.io:5432/egommerce
|
||||
- EVENTBUS_URL=amqp://guest:guest@esb.service.ego.io:5672
|
||||
|
||||
pricing-worker:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/pricing-worker:prod
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgresdb.service.ego.io:5432/egommerce
|
||||
- EVENTBUS_URL=amqp://guest:guest@esb.service.ego.io:5672
|
||||
|
||||
order-worker:
|
||||
env_file: ../.env.prod
|
||||
image: git.ego.cloudns.be/egommerce/order-worker:prod
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:12345678@postgresdb.service.ego.io:5432/egommerce
|
||||
- EVENTBUS_URL=amqp://guest:guest@esb.service.ego.io:5672
|
485
deploy/docker/stack.yml
Normal file
485
deploy/docker/stack.yml
Normal file
@ -0,0 +1,485 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
api-registry:
|
||||
image: git.ego.cloudns.be/egommerce/api-registry:latest
|
||||
command: [
|
||||
"consul",
|
||||
"agent",
|
||||
"-config-file=/consul/config/server.hcl",
|
||||
# "-config-dir=/consul/config",
|
||||
"-node=registry",
|
||||
"-bootstrap-expect=1"
|
||||
]
|
||||
environment:
|
||||
- APP_DOMAIN
|
||||
- APP_NAME=api-registry
|
||||
- CONSUL_HTTP_ADDR=127.0.0.1:8501
|
||||
- CONSUL_HTTP_SSL=true
|
||||
- CONSUL_CACERT=/usr/share/pki/ca-trust-source/anchors/internalCA.crt
|
||||
- CONSUL_CLIENT_CERT=/etc/certs/registry.crt
|
||||
- CONSUL_CLIENT_KEY=/etc/certs/registry.key
|
||||
- VAULT_ADDR=https://api-vault:8200
|
||||
# - VAULT_API_ADDR=https://api-vault:8200
|
||||
volumes:
|
||||
- registry_data:/consul/data
|
||||
- ../certs/api-registry/api-registry.crt:/etc/certs/registry.crt:ro
|
||||
- ../certs/api-registry/api-registry.key:/etc/certs/registry.key:ro
|
||||
- ../certs/ca-root/ca-root.crt:/usr/share/pki/ca-trust-source/anchors/internalCA.crt:ro
|
||||
- ../bin/register-service:/bin/register-service
|
||||
# - ../bin/update-resolv:/bin/update-resolv
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
api-gateway: # consul client running as api-gateway
|
||||
image: git.ego.cloudns.be/egommerce/api-registry:latest
|
||||
command: [
|
||||
"consul",
|
||||
"agent",
|
||||
"-config-file=/consul/config/gateway.hcl",
|
||||
# "-config-file=/consul/config/gateway-config.hcl",
|
||||
# "-config-file=/consul/config/gateway-routes.hcl",
|
||||
# "-config-dir=/consul/config",
|
||||
"-node=gateway",
|
||||
"-retry-join=api-registry"
|
||||
]
|
||||
environment:
|
||||
- APP_DOMAIN
|
||||
- APP_NAME=api-gateway
|
||||
- CONSUL_HTTP_ADDR=127.0.0.1:8501
|
||||
- CONSUL_HTTP_SSL=true
|
||||
- CONSUL_CACERT=/usr/share/pki/ca-trust-source/anchors/internalCA.crt
|
||||
- CONSUL_CLIENT_CERT=/etc/certs/gateway.crt
|
||||
- CONSUL_CLIENT_KEY=/etc/certs/gateway.key
|
||||
- VAULT_ADDR=https://api-vault:8200
|
||||
# - VAULT_API_ADDR=https://api-vault:8200
|
||||
volumes:
|
||||
- gateway_data:/consul/data
|
||||
- ../certs/api-gateway/api-gateway.crt:/etc/certs/gateway.crt:ro
|
||||
- ../certs/api-gateway/api-gateway.key:/etc/certs/gateway.key:ro
|
||||
- ../certs/catalog-svc/catalog-svc.crt:/etc/certs/catalog.crt:ro
|
||||
- ../certs/catalog-svc/catalog-svc.key:/etc/certs/catalog.key:ro
|
||||
- ../certs/ca-root/ca-root.crt:/usr/share/pki/ca-trust-source/anchors/internalCA.crt:ro
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
api-vault:
|
||||
image: git.ego.cloudns.be/egommerce/api-vault:latest
|
||||
command: ["vault", "server", "-config=/vault/config/server.hcl"]
|
||||
environment:
|
||||
- APP_DOMAIN
|
||||
- APP_NAME=api-vault
|
||||
- API_REGISTRY_ADDR=api-registry
|
||||
- VAULT_ADDR=https://localhost:8200
|
||||
- VAULT_API_ADDR=https://localhost:8200
|
||||
volumes:
|
||||
- vault_data:/vault/data
|
||||
- ../certs/api-vault/api-vault.crt:/etc/certs/vault.crt:ro
|
||||
- ../certs/api-vault/api-vault.key:/etc/certs/vault.key:ro
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
cap_add:
|
||||
- IPC_LOCK
|
||||
networks:
|
||||
- egommerce-network
|
||||
# cap_add:
|
||||
# - IPC_LOCK
|
||||
|
||||
api-eventbus:
|
||||
image: git.ego.cloudns.be/egommerce/api-eventbus:latest
|
||||
environment:
|
||||
# - RABBITMQ_NODENAME=api-eventbus
|
||||
- RABBITMQ_ERLANG_COOKIE=rabbitmq
|
||||
- APP_DOMAIN
|
||||
- APP_NAME=api-eventbus
|
||||
- API_REGISTRY_ADDR=api-registry
|
||||
volumes:
|
||||
- eventbus_data:/var/lib/rabbitmq
|
||||
- eventbus_logs:/var/log/rabbitmq
|
||||
- ../certs/api-eventbus/api-eventbus.crt:/etc/certs/eventbus.crt:ro
|
||||
- ../certs/api-eventbus/api-eventbus.key:/etc/certs/eventbus.key:ro
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
api-cache:
|
||||
image: git.ego.cloudns.be/egommerce/api-cache:latest
|
||||
environment:
|
||||
- APP_DOMAIN
|
||||
- APP_NAME=api-cache
|
||||
- API_REGISTRY_ADDR=api-registry
|
||||
volumes:
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
api-logger:
|
||||
image: git.ego.cloudns.be/egommerce/api-logger:latest
|
||||
environment:
|
||||
- APP_DOMAIN
|
||||
- APP_NAME=api-logger
|
||||
- API_REGISTRY_ADDR=api-registry
|
||||
volumes:
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
# api-prometheus:
|
||||
# image: prom/prometheus:latest # FIXME: create private image(prod/dev)...
|
||||
# user: root
|
||||
# environment:
|
||||
# - APP_DOMAIN
|
||||
# - APP_NAME=api-prometheus
|
||||
# - API_REGISTRY_ADDR=api-registry
|
||||
# volumes:
|
||||
# - ../etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
# - ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
# - ../bin/register-service:/bin/register-service
|
||||
# - ../bin/update-resolv:/bin/update-resolv
|
||||
# - /var/run/docker.sock:/var/run/docker.sock
|
||||
# depends_on:
|
||||
# - api-registry
|
||||
# networks:
|
||||
# - egommerce-network
|
||||
|
||||
# api-grafana:
|
||||
# image: grafana/grafana-oss:latest # FIXME: create private image(prod/dev)...
|
||||
# environment:
|
||||
# - APP_DOMAIN
|
||||
# - APP_NAME=api-grafana
|
||||
# - API_REGISTRY_ADDR=api-registry
|
||||
# volumes:
|
||||
# - grafana-db:/var/lib/grafana
|
||||
# - ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
# - ../bin/update-resolv:/bin/update-resolv
|
||||
# - ../bin/register-service:/bin/register-service
|
||||
# depends_on:
|
||||
# - api-registry
|
||||
# networks:
|
||||
# - egommerce-network
|
||||
|
||||
db-postgres:
|
||||
image: git.ego.cloudns.be/egommerce/db-postgres:latest
|
||||
environment:
|
||||
- APP_DOMAIN
|
||||
- APP_NAME=db-postgres
|
||||
- API_REGISTRY_ADDR=api-registry
|
||||
- POSTGRESQL_USERNAME=postgres
|
||||
- POSTGRESQL_DATABASE=postgres
|
||||
- POSTGRESQL_PASSWORD=H5Gd7^37*Hka*a72
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
# - ./db_migrations/init/:/docker-entrypoint-initdb.d/
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
# db-mongo:
|
||||
# image: mongo:5.0.14
|
||||
# environment:
|
||||
# - APP_DOMAIN
|
||||
# - APP_NAME=mongo-db
|
||||
# - API_REGISTRY_ADDR=api-registry
|
||||
# - MONGO_INITDB_ROOT_USERNAME=mongodb
|
||||
# - MONGO_INITDB_ROOT_PASSWORD
|
||||
# volumes:
|
||||
# - mongodb_data:/data/db
|
||||
# - ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
# - ../bin/register-service:/bin/register-service
|
||||
# - ../bin/update-resolv:/bin/update-resolv
|
||||
# depends_on:
|
||||
# - api-registry
|
||||
# deploy:
|
||||
# mode: replicated
|
||||
# replicas: 1
|
||||
# extra_hosts:
|
||||
# - "host.docker.internal:host-gateway"
|
||||
# networks:
|
||||
# - egommerce-network
|
||||
|
||||
# API micro-services
|
||||
identity-svc:
|
||||
image: git.ego.cloudns.be/egommerce/identity-svc:latest
|
||||
environment:
|
||||
- APP_NAME=identity-svc
|
||||
- APP_PATH_PREFIX=/identity
|
||||
- API_REGISTRY_ADDR=api-gateway
|
||||
- APP_DOMAIN
|
||||
- APP_KV_NAMESPACE
|
||||
- DATABASE_URL
|
||||
- MONGODB_URL
|
||||
- EVENTBUS_URL
|
||||
volumes:
|
||||
- ../certs/identity-svc/identity-svc.crt:/certs/client.crt:ro
|
||||
- ../certs/identity-svc/identity-svc.key:/certs/client.key:ro
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../db_migrations/identity-svc:/migrations
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
catalog-svc:
|
||||
image: git.ego.cloudns.be/egommerce/catalog-svc:latest
|
||||
environment:
|
||||
- APP_NAME=catalog-svc
|
||||
- APP_PATH_PREFIX=/catalog
|
||||
- API_REGISTRY_ADDR=api-gateway
|
||||
- APP_DOMAIN
|
||||
- APP_KV_NAMESPACE
|
||||
- AUTH_HANDLER_URL
|
||||
- DATABASE_URL
|
||||
- MONGODB_URL
|
||||
- EVENTBUS_URL
|
||||
volumes:
|
||||
- ../certs/catalog-svc/catalog-svc.crt:/certs/client.crt:ro
|
||||
- ../certs/catalog-svc/catalog-svc.key:/certs/client.key:ro
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../db_migrations/catalog-svc:/migrations
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
basket-svc:
|
||||
image: git.ego.cloudns.be/egommerce/basket-svc:latest
|
||||
environment:
|
||||
- APP_NAME=basket-svc
|
||||
- APP_PATH_PREFIX=/basket
|
||||
- API_REGISTRY_ADDR=api-gateway
|
||||
- APP_DOMAIN
|
||||
- APP_KV_NAMESPACE
|
||||
- AUTH_HANDLER_URL
|
||||
- DATABASE_URL
|
||||
- MONGODB_URL
|
||||
- EVENTBUS_URL
|
||||
volumes:
|
||||
- ../certs/basket-svc/basket-svc.crt:/certs/client.crt:ro
|
||||
- ../certs/basket-svc/basket-svc.key:/certs/client.key:ro
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../db_migrations/basket-svc:/migrations
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
order-svc:
|
||||
image: git.ego.cloudns.be/egommerce/order-svc:latest
|
||||
environment:
|
||||
- APP_NAME=order-svc
|
||||
- APP_PATH_PREFIX=/order
|
||||
- API_REGISTRY_ADDR=api-gateway
|
||||
- APP_DOMAIN
|
||||
- APP_KV_NAMESPACE
|
||||
- AUTH_HANDLER_URL
|
||||
- DATABASE_URL
|
||||
- MONGODB_URL
|
||||
- EVENTBUS_URL
|
||||
volumes:
|
||||
- ../certs/order-svc/order-svc.crt:/certs/client.crt:ro
|
||||
- ../certs/order-svc/order-svc.key:/certs/client.key:ro
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../db_migrations/order-svc:/migrations
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
pricing-svc:
|
||||
image: git.ego.cloudns.be/egommerce/pricing-svc:latest
|
||||
environment:
|
||||
- APP_NAME=pricing-svc
|
||||
- APP_PATH_PREFIX=/pricing
|
||||
- API_REGISTRY_ADDR=api-gateway
|
||||
- APP_DOMAIN
|
||||
- APP_KV_NAMESPACE
|
||||
- AUTH_HANDLER_URL
|
||||
- DATABASE_URL
|
||||
- MONGODB_URL
|
||||
- EVENTBUS_URL
|
||||
volumes:
|
||||
- ../certs/pricing-svc/pricing-svc.crt:/certs/client.crt:ro
|
||||
- ../certs/pricing-svc/pricing-svc.key:/certs/client.key:ro
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../db_migrations/pricing-svc:/migrations
|
||||
- ../bin/register-service:/bin/register-service
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
depends_on:
|
||||
- api-registry
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
# Workers (Eventbus)
|
||||
basket-worker:
|
||||
image: git.ego.cloudns.be/egommerce/basket-worker:latest
|
||||
environment:
|
||||
- APP_NAME=basket-worker
|
||||
- APP_KV_NAMESPACE
|
||||
- DATABASE_URL
|
||||
- MONGODB_URL
|
||||
- EVENTBUS_URL
|
||||
volumes:
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
catalog-worker:
|
||||
image: git.ego.cloudns.be/egommerce/catalog-worker:latest
|
||||
environment:
|
||||
- APP_NAME=catalog-worker
|
||||
- DATABASE_URL
|
||||
- MONGODB_URL
|
||||
- EVENTBUS_URL
|
||||
volumes:
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
pricing-worker:
|
||||
image: git.ego.cloudns.be/egommerce/pricing-worker:latest
|
||||
environment:
|
||||
- APP_NAME=pricing-worker
|
||||
- DATABASE_URL
|
||||
- MONGODB_URL
|
||||
- EVENTBUS_URL
|
||||
volumes:
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
order-worker:
|
||||
image: git.ego.cloudns.be/egommerce/order-worker:latest
|
||||
environment:
|
||||
- APP_NAME=order-worker
|
||||
- DATABASE_URL
|
||||
- MONGODB_URL
|
||||
- EVENTBUS_URL
|
||||
volumes:
|
||||
- ../certs/ca-root/ca-root.crt:/usr/local/share/ca-certificates/internalCA.crt:ro
|
||||
- ../bin/update-resolv:/bin/update-resolv
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- egommerce-network
|
||||
|
||||
volumes:
|
||||
postgres_data: ~
|
||||
mongodb_data: ~
|
||||
registry_data: ~
|
||||
gateway_data: ~
|
||||
vault_data: ~
|
||||
eventbus_data: ~
|
||||
eventbus_logs: ~
|
||||
# grafana-db: ~
|
||||
|
||||
networks:
|
||||
# Infrastructure networks
|
||||
egommerce-network:
|
||||
driver: overlay
|
@ -1,133 +0,0 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
# 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:
|
||||
image: git.pbiernat.dev/egommerce/api-registry:dev
|
||||
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_NODENAME=api-eventbus
|
||||
# - 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
|
||||
ports:
|
||||
- 24224:24224
|
||||
|
||||
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
|
||||
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:
|
||||
- ./certs/identity-svc:/certs
|
||||
|
||||
basket-svc:
|
||||
image: git.pbiernat.dev/egommerce/basket-svc:dev
|
||||
environment:
|
||||
- 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
|
||||
|
||||
catalog-svc:
|
||||
image: git.pbiernat.dev/egommerce/catalog-svc:dev
|
||||
environment:
|
||||
- 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
|
||||
|
||||
order-svc:
|
||||
image: git.pbiernat.dev/egommerce/order-svc:dev
|
||||
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
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.local:27017
|
||||
- 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
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.local:27017
|
||||
- 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
|
||||
- MONGODB_URL=mongodb://mongodb:12345678@mongodb.egommerce.local:27017
|
||||
- EVENTBUS_URL=amqp://guest:guest@eventbus.egommerce.local:5672
|
@ -1,265 +0,0 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
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: git.pbiernat.dev/egommerce/api-registry:latest
|
||||
environment:
|
||||
- APP_NAME=api-registry
|
||||
- APP_DOMAIN
|
||||
# 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
|
||||
environment:
|
||||
- APP_NAME=postgres-db
|
||||
- APP_DOMAIN
|
||||
- POSTGRES_USER=postgres
|
||||
- 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-db-network
|
||||
- api-logger-network
|
||||
|
||||
mongo-db:
|
||||
image: mongo:5.0.14
|
||||
environment:
|
||||
- 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:
|
||||
- mongodb-db-network
|
||||
- api-logger-network
|
||||
|
||||
# API micro-services
|
||||
identity-svc:
|
||||
image: git.pbiernat.dev/egommerce/identity-svc:latest
|
||||
environment:
|
||||
- APP_NAME=identity-svc
|
||||
- APP_DOMAIN
|
||||
- DATABASE_URL
|
||||
- MONGODB_URL
|
||||
- EVENTBUS_URL
|
||||
networks:
|
||||
- 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
|
||||
- MONGODB_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
|
||||
- MONGODB_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
|
||||
- MONGODB_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
|
||||
- MONGODB_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
|
||||
- MONGODB_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
|
||||
- MONGODB_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:
|
||||
api-gateway-network:
|
||||
driver: overlay
|
||||
internal: true
|
||||
|
||||
api-registry-network:
|
||||
driver: overlay
|
||||
internal: true
|
||||
|
||||
api-eventbus-network:
|
||||
driver: overlay
|
||||
internal: true
|
||||
|
||||
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
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
120
deploy/etc/nginx/nginx-vhost.dev.conf
Normal file
120
deploy/etc/nginx/nginx-vhost.dev.conf
Normal file
@ -0,0 +1,120 @@
|
||||
upstream egommerce-api-gw {
|
||||
server 127.0.0.1:48443;
|
||||
}
|
||||
|
||||
upstream egommerce-api-gw-dashboard {
|
||||
server 127.0.0.1:48444;
|
||||
}
|
||||
|
||||
upstream egommerce-api-registry-ui {
|
||||
server 127.0.0.1:48445;
|
||||
}
|
||||
|
||||
upstream egommerce-api-eventbus-mngmt {
|
||||
server 127.0.0.1:48446;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
ssl_certificate /etc/letsencrypt/live/admin.egommerce.pbiernat.io/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/admin.egommerce.pbiernat.io/privkey.pem;
|
||||
|
||||
server_name admin.egommerce.pbiernat.io;
|
||||
|
||||
# Traefik redirects
|
||||
location /dashboard {
|
||||
if ($http_referer ~ (/gateway)) {
|
||||
proxy_pass http://egommerce-api-gw-dashboard;
|
||||
}
|
||||
}
|
||||
location /api {
|
||||
if ($http_referer ~ (/gateway)) {
|
||||
proxy_pass http://egommerce-api-gw-dashboard;
|
||||
}
|
||||
}
|
||||
|
||||
location /gateway/ {
|
||||
proxy_pass http://egommerce-api-gw-dashboard/dashboard/;
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
client_max_body_size 0;
|
||||
}
|
||||
|
||||
# Consul redirects
|
||||
location /ui {
|
||||
if ($http_referer ~ (/registry)) {
|
||||
proxy_pass http://egommerce-api-registry-ui;
|
||||
}
|
||||
}
|
||||
|
||||
location /v1 {
|
||||
if ($http_referer ~ (/registry)) {
|
||||
proxy_pass http://egommerce-api-registry-ui;
|
||||
}
|
||||
}
|
||||
|
||||
location /registry {
|
||||
proxy_pass http://egommerce-api-registry-ui;
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
client_max_body_size 0;
|
||||
}
|
||||
|
||||
|
||||
# RabbitMQ Mngmt redirects
|
||||
location /eventbus {
|
||||
return 302 /eventbus/;
|
||||
}
|
||||
location ~* /eventbus/api/(.*?)/(.*) {
|
||||
proxy_pass http://egommerce-api-eventbus-mngmt/api/$1/%2F/$2?$query_string;
|
||||
proxy_buffering off;
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
location ~* /eventbus/(.*) {
|
||||
rewrite ^/eventbus/(.*)$ /$1 break;
|
||||
proxy_pass http://egommerce-api-eventbus-mngmt;
|
||||
proxy_buffering off;
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
error_log /var/log/nginx/admin-egommerce.pbiernat.io-error.log;
|
||||
access_log /var/log/nginx/admin-egommerce.pbiernat.io-access.log combined;
|
||||
}
|
||||
|
||||
#server {
|
||||
# listen 443 ssl;
|
||||
# ssl_certificate /etc/letsencrypt/live/egommerce.pbiernat.io/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/egommerce.pbiernat.io/privkey.pem;
|
||||
#
|
||||
# server_name egommerce.pbiernat.io;
|
||||
#
|
||||
# # Pass all requests to the API Gateway
|
||||
# location / {
|
||||
# proxy_pass https://egommerce-api-gw;
|
||||
# proxy_http_version 1.1;
|
||||
# proxy_pass_header Server;
|
||||
# proxy_set_header Host $host;
|
||||
# proxy_set_header X-Real-IP $remote_addr;
|
||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# client_max_body_size 0;
|
||||
# }
|
||||
#
|
||||
# error_log /var/log/nginx/egommerce.pbiernat.io-error.log;
|
||||
# access_log /var/log/nginx/egommerce.pbiernat.io-access.log combined;
|
||||
#}
|
||||
|
109
deploy/etc/nginx/nginx-vhost.local.conf
Normal file
109
deploy/etc/nginx/nginx-vhost.local.conf
Normal file
@ -0,0 +1,109 @@
|
||||
upstream egommerce-api-gw {
|
||||
server 127.0.0.1:48443;
|
||||
}
|
||||
|
||||
upstream egommerce-api-gw-dashboard {
|
||||
server 127.0.0.1:48444;
|
||||
}
|
||||
|
||||
upstream egommerce-api-registry-ui {
|
||||
server 127.0.0.1:48445;
|
||||
}
|
||||
|
||||
upstream egommerce-api-eventbus-mngmt {
|
||||
server 127.0.0.1:48446;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
ssl_certificate /home/keedosn/workspace/golang/src/git.pbiernat.io/egommerce/stack/deploy/certs/api-gateway/localhost.cert;
|
||||
ssl_certificate_key /home/keedosn/workspace/golang/src/git.pbiernat.io/egommerce/stack/deploy/certs/api-gateway/localhost.key;
|
||||
|
||||
server_name egommerce.local;
|
||||
|
||||
# Traefik redirects
|
||||
location /dashboard {
|
||||
if ($http_referer ~ (/gateway)) {
|
||||
proxy_pass http://egommerce-api-gw-dashboard;
|
||||
}
|
||||
}
|
||||
location /api {
|
||||
if ($http_referer ~ (/gateway)) {
|
||||
proxy_pass http://egommerce-api-gw-dashboard;
|
||||
}
|
||||
}
|
||||
|
||||
location /gateway/ {
|
||||
proxy_pass http://egommerce-api-gw-dashboard/dashboard/;
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
client_max_body_size 0;
|
||||
}
|
||||
|
||||
# Consul redirects
|
||||
location /ui {
|
||||
if ($http_referer ~ (/registry)) {
|
||||
proxy_pass http://egommerce-api-registry-ui;
|
||||
}
|
||||
}
|
||||
|
||||
location /v1 {
|
||||
if ($http_referer ~ (/registry)) {
|
||||
proxy_pass http://egommerce-api-registry-ui;
|
||||
}
|
||||
}
|
||||
|
||||
location /registry {
|
||||
proxy_pass http://egommerce-api-registry-ui;
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
client_max_body_size 0;
|
||||
}
|
||||
|
||||
|
||||
# RabbitMQ Mngmt redirects
|
||||
location /eventbus {
|
||||
return 302 /eventbus/;
|
||||
}
|
||||
location ~* /eventbus/api/(.*?)/(.*) {
|
||||
proxy_pass http://egommerce-api-eventbus-mngmt/api/$1/%2F/$2?$query_string;
|
||||
proxy_buffering off;
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
location ~* /eventbus/(.*) {
|
||||
rewrite ^/eventbus/(.*)$ /$1 break;
|
||||
proxy_pass http://egommerce-api-eventbus-mngmt;
|
||||
proxy_buffering off;
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
# Pass all requests to the API Gateway
|
||||
location / {
|
||||
proxy_pass https://egommerce-api-gw;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
client_max_body_size 0;
|
||||
}
|
||||
|
||||
error_log /var/log/nginx/egommerce.local-error.log;
|
||||
access_log /var/log/nginx/egommerce.local-access.log combined;
|
||||
}
|
||||
|
82
deploy/etc/prometheus/prometheus.yml
Normal file
82
deploy/etc/prometheus/prometheus.yml
Normal file
@ -0,0 +1,82 @@
|
||||
global:
|
||||
scrape_interval: 10s
|
||||
evaluation_interval: 10s
|
||||
|
||||
# rule_files:
|
||||
# - "first.rules"
|
||||
# - "second.rules"
|
||||
|
||||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
|
||||
- job_name: docker
|
||||
dockerswarm_sd_configs:
|
||||
- host: unix:///var/run/docker.sock
|
||||
role: tasks
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_dockerswarm_service_name, __address__]
|
||||
regex: egommerce_(api-eventbus|api-gateway);(.*):(.*)
|
||||
action: replace
|
||||
replacement: '$2:8084'
|
||||
target_label: __address__
|
||||
# - source_labels: [__meta_dockerswarm_service_name, __address__]
|
||||
# regex: egommerce_api-gateway;(.*):(.*)
|
||||
# action: replace
|
||||
# replacement: '$1:8084'
|
||||
# target_label: __address__
|
||||
# Only keep containers that should be running.
|
||||
- source_labels: [__meta_dockerswarm_service_label_com_docker_stack_namespace]
|
||||
regex: egommerce
|
||||
action: keep
|
||||
- source_labels: [__meta_dockerswarm_task_desired_state]
|
||||
regex: running
|
||||
action: keep
|
||||
# - source_labels: [__meta_dockerswarm_network_name]
|
||||
# regex: ingress
|
||||
# action: keep
|
||||
- source_labels: [__meta_dockerswarm_service_name]
|
||||
action: replace
|
||||
replacement: '$1'
|
||||
target_label: instance
|
||||
# - source_labels: [__meta_dockerswarm_task_desired_state]
|
||||
# regex: running
|
||||
# action: keep
|
||||
|
||||
|
||||
# - job_name: consul
|
||||
# consul_sd_configs:
|
||||
# - server: api-registry:8501
|
||||
# services:
|
||||
# - consul
|
||||
# - basket-server
|
||||
# - catalog-server
|
||||
# - identity-svc
|
||||
# - order-svc
|
||||
# - pricing-svc
|
||||
# - consul
|
||||
|
||||
# - job_name: rabbitmq
|
||||
# consul_sd_configs:
|
||||
# - server: api-registry:8501
|
||||
# services:
|
||||
# - api-eventbus
|
||||
# relabel_configs:
|
||||
# - source_labels: ['__meta_consul_service_address']
|
||||
# replacement: '$1:8084'
|
||||
# target_label: __address__
|
||||
# - source_labels: ['__meta_consul_service_port']
|
||||
# replacement: '8084'
|
||||
# target_label: __meta_consul_service_port
|
||||
|
||||
# - job_name: 'api-gateway'
|
||||
# static_configs:
|
||||
# - targets: ['api-gateway:8084']
|
||||
# - job_name: 'api-eventbus'
|
||||
# static_configs:
|
||||
# - targets: ['api-eventbus:8084']
|
||||
|
||||
# - job_name: 'catalog-svc'
|
||||
# static_configs:
|
||||
# - targets: ['catalog-svc:8084']
|
0
deploy/k8s/stack.dev.local.yml
Normal file
0
deploy/k8s/stack.dev.local.yml
Normal file
48
deploy/k8s/stack.dev.yml
Normal file
48
deploy/k8s/stack.dev.yml
Normal file
@ -0,0 +1,48 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: api-registry
|
||||
labels:
|
||||
app.kubernetes.io/name: api-registry
|
||||
spec:
|
||||
containers:
|
||||
- name: api-registry
|
||||
image: git.ego.cloudns.be/egommerce/api-registry:dev
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512M
|
||||
ports:
|
||||
- containerPort: 8501
|
||||
name: api-registry-ui
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: api-registry
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: api-registry
|
||||
ports:
|
||||
- name: api-registry-ui
|
||||
protocol: TCP
|
||||
port: 8501
|
||||
targetPort: api-registry-ui
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: api-registry
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: api-registry
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: api-registry
|
||||
spec:
|
||||
containers:
|
||||
- name: api-registry
|
||||
image: git.ego.cloudns.be/egommerce/api-registry:dev
|
28
deploy/k8s/stack.prod.yml
Normal file
28
deploy/k8s/stack.prod.yml
Normal file
@ -0,0 +1,28 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: api-registry
|
||||
labels:
|
||||
app.kubernetes.io/name: api-registry
|
||||
spec:
|
||||
containers:
|
||||
- name: api-registry
|
||||
image: git.ego.cloudns.be/egommerce/api-registry:prod
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: api-registry
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: api-registry
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: api-registry
|
||||
spec:
|
||||
containers:
|
||||
- name: api-registry
|
||||
image: git.ego.cloudns.be/egommerce/api-registry:prod
|
78
deploy/k8s/stack.yml
Normal file
78
deploy/k8s/stack.yml
Normal file
@ -0,0 +1,78 @@
|
||||
# kind: Namespace
|
||||
# apiVersion: v1
|
||||
# metadata:
|
||||
# name: egommerce
|
||||
# labels:
|
||||
# name: egommerce
|
||||
# ---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: docker-credentials
|
||||
data:
|
||||
.dockerconfigjson: ewoJImF1dGhzIjogewoJCSJnaXQucGJpZXJuYXQuaW8iOiB7CgkJCSJhdXRoIjogImEyVmxaRzl6YmpwWGIyeHVaVFZQY0hKdlozSmhiVzkzWVc1cFpVQT0iCgkJfSwKCQkiaHR0cHM6Ly9pbmRleC5kb2NrZXIuaW8vdjEvIjogewoJCQkiYXV0aCI6ICJhMlZsWkc5emJqcGtiMk5yWlhKdmQyVTFiMkp5WVhwNSIKCQl9Cgl9Cn0=
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
---
|
||||
# apiVersion: v1
|
||||
# kind: Pod
|
||||
# metadata:
|
||||
# name: api-registry
|
||||
# labels:
|
||||
# app.kubernetes.io/name: api-registry
|
||||
# spec:
|
||||
# hostNetwork: true
|
||||
# containers:
|
||||
# - name: api-registry
|
||||
# image: git.pbiernat.dev/egommerce/api-registry:dev
|
||||
# resources:
|
||||
# limits:
|
||||
# cpu: "1"
|
||||
# memory: 512M
|
||||
# ports:
|
||||
# - containerPort: 8501
|
||||
# name: api-registry-ui
|
||||
# ---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: api-registry
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/name: api-registry
|
||||
ports:
|
||||
- name: api-registry-ui
|
||||
protocol: TCP
|
||||
port: 8501
|
||||
targetPort: api-registry-ui
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: api-registry
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: api-registry
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: api-registry
|
||||
spec:
|
||||
hostNetwork: true
|
||||
hostAliases:
|
||||
- ip: "127.0.0.1"
|
||||
hostnames:
|
||||
- "git.pbiernat.io"
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
restartPolicy: Always
|
||||
containers:
|
||||
- name: api-registry
|
||||
image: git.pbiernat.dev/egommerce/api-registry:dev
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512M
|
||||
ports:
|
||||
- containerPort: 53
|
||||
- containerPort: 8501
|
156
deploy/make-cert.sh
Executable file
156
deploy/make-cert.sh
Executable file
@ -0,0 +1,156 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd deploy/certs
|
||||
|
||||
mkdir -p ca
|
||||
mkdir -p api-gateway api-registry api-gateway api-eventbus api-vault
|
||||
mkdir -p basket-svc catalog-svc identity-svc order-svc pricing-svc
|
||||
|
||||
# # Generate ROOT Key
|
||||
# openssl genrsa -out ca/internalCA.key 4096
|
||||
|
||||
# # Generate ROOT Cert
|
||||
# openssl req -x509 -new -nodes -key ca/internalCA.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io CA/CN=egommerce.io" \
|
||||
# -sha256 -days 3650 -out ca/internalCA.crt
|
||||
|
||||
|
||||
# # MANAGING SERVICES
|
||||
|
||||
# # Generate Key for API-REGISTRY
|
||||
# openssl genrsa -out api-registry/registry.key 2048
|
||||
|
||||
# # Generate Cert for API-REGISTRY
|
||||
openssl req -new -sha256 -key api-registry/registry.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=api-registry" \
|
||||
-out api-registry/registry.internal.csr
|
||||
openssl req -new -sha256 -key api-registry/registry.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=api-registry" \
|
||||
-out api-registry/registry.local.csr
|
||||
|
||||
openssl x509 -req -in api-registry/registry.internal.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:api-registry,DNS:consul.service.ego.io,DNS:consul.service.dc.ego.io,IP:127.0.0.1')) \
|
||||
-out api-registry/registry.internal.crt -days 365 -sha256
|
||||
openssl x509 -req -in api-registry/registry.local.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:api-registry,DNS:registry.egommerce.local,DNS:host.docker.internal,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out api-registry/registry.local.crt -days 365 -sha256
|
||||
|
||||
# # Generate Key for API-GATEWAY
|
||||
# openssl genrsa -out api-gateway/gateway.key 2048
|
||||
|
||||
# # Generate Cert for API-GATEWAY
|
||||
openssl req -new -sha256 -key api-gateway/gateway.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=api-gateway" \
|
||||
-out api-gateway/gateway.internal.csr
|
||||
openssl req -new -sha256 -key api-gateway/gateway.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=api-gateway" \
|
||||
-out api-gateway/gateway.local.csr
|
||||
|
||||
openssl x509 -req -in api-gateway/gateway.internal.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:api-gateway,DNS:gateway.service.ego.io,DNS:gateway.service.dc.ego.io,IP:127.0.0.1')) \
|
||||
-out api-gateway/gateway.internal.crt -days 365 -sha256
|
||||
openssl x509 -req -in api-gateway/gateway.local.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:api-gateway,DNS:gateway.egommerce.local,DNS:host.docker.internal,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out api-gateway/gateway.local.crt -days 365 -sha256
|
||||
|
||||
# Generate Key for API-VAULT
|
||||
# openssl genrsa -out api-vault/vault.key 2048
|
||||
|
||||
# Generate Cert for API-VAULT
|
||||
openssl req -new -sha256 -key api-vault/vault.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=api-vault" \
|
||||
-out api-vault/vault.internal.csr
|
||||
openssl req -new -sha256 -key api-vault/vault.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=api-vault" \
|
||||
-out api-vault/vault.local.csr
|
||||
|
||||
openssl x509 -req -in api-vault/vault.internal.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:api-vault,DNS:vault.service.ego.io,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out api-vault/vault.internal.crt -days 365 -sha256
|
||||
openssl x509 -req -in api-vault/vault.local.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:api-vault,DNS:vault.egommerce.local,DNS:host.docker.internal,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out api-vault/vault.local.crt -days 365 -sha256
|
||||
|
||||
|
||||
# Generate Key for API-EVENTBUS
|
||||
# openssl genrsa -out api-eventbus/eventbus.key 2048
|
||||
|
||||
# Generate Cert for API-EVENTBUS
|
||||
openssl req -new -sha256 -key api-eventbus/eventbus.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=api-eventbus" \
|
||||
-out api-eventbus/eventbus.internal.csr
|
||||
openssl req -new -sha256 -key api-eventbus/eventbus.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=api-eventbus" \
|
||||
-out api-eventbus/eventbus.local.csr
|
||||
|
||||
openssl x509 -req -in api-eventbus/eventbus.internal.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:api-eventbus,DNS:esb.service.ego.io,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out api-eventbus/eventbus.internal.crt -days 365 -sha256
|
||||
openssl x509 -req -in api-eventbus/eventbus.local.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:api-eventbus,DNS:eventbus.egommerce.local,DNS:host.docker.internal,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out api-eventbus/eventbus.local.crt -days 365 -sha256
|
||||
|
||||
|
||||
# API MICROSERVICES
|
||||
# Generate Key for domain (service) - BASKET-SVC
|
||||
# openssl genrsa -out basket-svc/basket-svc.key 2048
|
||||
|
||||
# Generate Cert for domain (service) - BASKET-SVC
|
||||
openssl req -new -sha256 -key basket-svc/basket-svc.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=basket-svc" \
|
||||
-out basket-svc/basket-svc.csr
|
||||
|
||||
openssl x509 -req -in basket-svc/basket-svc.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:basket-svc,DNS:basket.service.ego.io,DNS:host.docker.internal,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out basket-svc/basket-svc.crt -days 365 -sha256
|
||||
|
||||
|
||||
# Generate Key for domain (service) - CATALOG-SVC
|
||||
# openssl genrsa -out catalog-svc/catalog-svc.key 2048
|
||||
|
||||
# Generate Cert for domain (service) - CATALOG-SVC
|
||||
openssl req -new -sha256 -key catalog-svc/catalog-svc.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=catalog-svc" \
|
||||
-out catalog-svc/catalog-svc.csr
|
||||
|
||||
openssl x509 -req -in catalog-svc/catalog-svc.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:catalog-svc,DNS:catalog.service.ego.io,DNS:host.docker.internal,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out catalog-svc/catalog-svc.crt -days 365 -sha256
|
||||
|
||||
|
||||
# Generate Key for domain (service) - IDENTITY-SVC
|
||||
# openssl genrsa -out identity-svc/identity-svc.key 2048
|
||||
|
||||
# Generate Cert for domain (service) - IDENTITY-SVC
|
||||
openssl req -new -sha256 -key identity-svc/identity-svc.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=identity-svc" \
|
||||
-out identity-svc/identity-svc.csr
|
||||
|
||||
openssl x509 -req -in identity-svc/identity-svc.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:identity-svc,DNS:identity.service.ego.io,DNS:host.docker.internal,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out identity-svc/identity-svc.crt -days 365 -sha256
|
||||
|
||||
|
||||
# Generate Key for domain (service) - ORDER-SVC
|
||||
# openssl genrsa -out order-svc/order-svc.key 2048
|
||||
|
||||
# Generate Cert for domain (service) - ORDER-SVC
|
||||
openssl req -new -sha256 -key order-svc/order-svc.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=order-svc" \
|
||||
-out order-svc/order-svc.csr
|
||||
|
||||
openssl x509 -req -in order-svc/order-svc.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:order-svc,DNS:order.service.ego.io,DNS:host.docker.internal,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out order-svc/order-svc.crt -days 365 -sha256
|
||||
|
||||
|
||||
# Generate Key for domain (service) - PRICING-SVC
|
||||
# openssl genrsa -out pricing-svc/pricing-svc.key 2048
|
||||
|
||||
# Generate Cert for domain (service) - PRICING-SVC
|
||||
openssl req -new -sha256 -key pricing-svc/pricing-svc.key -subj "/C=PL/ST=Slask/L=Gliwice/O=Egommerce.io/CN=pricing-svc" \
|
||||
-out pricing-svc/pricing-svc.csr
|
||||
|
||||
openssl x509 -req -in pricing-svc/pricing-svc.csr -CA ca/internalCA.crt -CAkey ca/internalCA.key -CAcreateserial \
|
||||
-extensions SAN \
|
||||
-extfile <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:pricing-svc,DNS:pricing.service.ego.io,DNS:host.docker.internal,DNS:localhost,IP:127.0.0.1')) \
|
||||
-out pricing-svc/pricing-svc.crt -days 365 -sha256
|
3
deploy/scripts/build-register-service-binary.sh
Executable file
3
deploy/scripts/build-register-service-binary.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o deploy/bin/register-service deploy/bin/register-service.go
|
255
deploy/scripts/gen-certs.sh
Normal file
255
deploy/scripts/gen-certs.sh
Normal file
@ -0,0 +1,255 @@
|
||||
# #!/bin/bash
|
||||
|
||||
export DEPLOY_DIR="./deploy"
|
||||
export CERTS_DIR="${DEPLOY_DIR}/certs/"
|
||||
|
||||
export REGISTRY_CN="registry.egommerce.local,api-registry,localhost"
|
||||
export REGISTRY_SAN="DNS:registry.egommerce.local,DNS:api-registry,DNS:localhost,IP:127.0.0.1"
|
||||
export GATEWAY_CN="gateway.egommerce.local,api-gatway,localhost"
|
||||
export GATEWAY_SAN="DNS:gateway.egommerce.local,DNS:api-gateway,DNS:gw.egommerce.local,DNS:localhost,IP:127.0.0.1"
|
||||
export VAULT_CN="vault.egommerce.local,api-vault,localhost"
|
||||
export VAULT_SAN="DNS:vault.egommerce.local,DNS:api-vault,DNS:localhost,IP:127.0.0.1"
|
||||
export EVENTBUS_CN="esb.egommerce.local,api-eventbus,localhost"
|
||||
export EVENTBUS_SAN="DNS:esb.egommerce.local,DNS:api-eventbus,DNS:localhost,IP:127.0.0.1"
|
||||
export CACHE_CN="cache.egommerce.local,api-cache,localhost"
|
||||
export CACHE_SAN="DNS:cache.egommerce.local,DNS:api-cache,DNS:localhost,IP:127.0.0.1"
|
||||
export LOGGER_CN="logger.egommerce.local,api-logger,localhost"
|
||||
export LOGGER_SAN="DNS:logger.egommerce.local,DNS:api-logger,DNS:localhost,IP:127.0.0.1"
|
||||
export PROMETHEUS_CN="prometheus.egommerce.local,api-prometheus,localhost"
|
||||
export PROMETHEUS_SAN="DNS:prometheus.egommerce.local,DNS:api-prometheus,DNS:localhost,IP:127.0.0.1"
|
||||
export GRAFANA_CN="grafana.egommerce.local,api-grafana,localhost"
|
||||
export GRAFANA_SAN="DNS:grafana.egommerce.local,DNS:api-grafana,DNS:localhost,IP:127.0.0.1"
|
||||
export POSTGRES_CN="postgresdb.egommerce.local,db-postgres,localhost"
|
||||
export POSTGRES_SAN="DNS:pstgresdb.egommerce.local,DNS:db-postgres,DNS:localhost,IP:127.0.0.1"
|
||||
export MONGO_CN="mongo.db.egommerce.local,db-mongo,localhost"
|
||||
export MONGO_SAN="DNS:mongo.db.egommerce.local,DNS:db-mongo,DNS:localhost,IP:127.0.0.1"
|
||||
export IDENTITY_CN="gateway.egommerce.local,identity.egommerce.local"
|
||||
export IDENTITY_SAN="DNS:gateway.egommerce.local,DNS:identity.egommerce.local,DNS:localhost,IP:127.0.0.1"
|
||||
export CATALOG_CN="gateway.egommerce.local, catalog.egommerce.local"
|
||||
export CATALOG_SAN="DNS:gateway.egommerce.local,DNS:catalog.egommerce.local,DNS:localhost,IP:127.0.0.1"
|
||||
export BASKET_CN="gateway.egommerce.local"
|
||||
export BASKET_SAN="DNS:gateway.egommerce.local,DNS:localhost,IP:127.0.0.1"
|
||||
export ORDER_CN="gateway.egommerce.local"
|
||||
export ORDER_SAN="DNS:gateway.egommerce.local,DNS:localhost,IP:127.0.0.1"
|
||||
export PRICING_CN="gateway.egommerce.local"
|
||||
export PRICING_SAN="DNS:gateway.egommerce.local,DNS:localhost,IP:127.0.0.1"
|
||||
|
||||
# Create required directories
|
||||
mkdir -p \
|
||||
${CERTS_DIR} \
|
||||
${CERTS_DIR}ca-root \
|
||||
${CERTS_DIR}api-registry \
|
||||
${CERTS_DIR}api-gateway \
|
||||
${CERTS_DIR}api-vault \
|
||||
${CERTS_DIR}api-eventbus \
|
||||
${CERTS_DIR}api-cache \
|
||||
${CERTS_DIR}api-logger \
|
||||
${CERTS_DIR}api-prometheus \
|
||||
${CERTS_DIR}api-grafana \
|
||||
${CERTS_DIR}db-postgres \
|
||||
${CERTS_DIR}db-mongo \
|
||||
${CERTS_DIR}identity-svc \
|
||||
${CERTS_DIR}basket-svc \
|
||||
${CERTS_DIR}catalog-svc \
|
||||
${CERTS_DIR}order-svc \
|
||||
${CERTS_DIR}pricing-svc
|
||||
|
||||
# Generate Root CA cert
|
||||
# openssl req -newkey rsa:2048 -nodes -x509 -days 1024 \
|
||||
# -subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/OU=DevOps Team/CN=Egommerce CA" \
|
||||
# -keyout ${CERTS_DIR}ca-root/ca-root.key -out ${CERTS_DIR}ca-root/ca-root.crt >/dev/null
|
||||
|
||||
|
||||
# Generate Registry cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$REGISTRY_CN" \
|
||||
-keyout ${CERTS_DIR}api-registry/api-registry.key \
|
||||
-out ${CERTS_DIR}api-registry/api-registry.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}api-registry/api-registry.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${REGISTRY_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}api-registry/api-registry.crt >/dev/null
|
||||
|
||||
|
||||
# Generate Gateway cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$GATEWAY_CN" \
|
||||
-keyout ${CERTS_DIR}api-gateway/api-gateway.key \
|
||||
-out ${CERTS_DIR}api-gateway/api-gateway.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}api-gateway/api-gateway.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${GATEWAY_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}api-gateway/api-gateway.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Vault cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$VAULT_CN" \
|
||||
-keyout ${CERTS_DIR}api-vault/api-vault.key \
|
||||
-out ${CERTS_DIR}api-vault/api-vault.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}api-vault/api-vault.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${VAULT_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}api-vault/api-vault.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Eventbus cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$EVENTBUS_CN" \
|
||||
-keyout ${CERTS_DIR}api-eventbus/api-eventbus.key \
|
||||
-out ${CERTS_DIR}api-eventbus/api-eventbus.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}api-eventbus/api-eventbus.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${EVENTBUS_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}api-eventbus/api-eventbus.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Cache cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$CACHE_CN" \
|
||||
-keyout ${CERTS_DIR}api-cache/api-cache.key \
|
||||
-out ${CERTS_DIR}api-cache/api-cache.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}api-cache/api-cache.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${CACHE_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}api-cache/api-cache.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Logger cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$LOGGER_CN" \
|
||||
-keyout ${CERTS_DIR}api-logger/api-logger.key \
|
||||
-out ${CERTS_DIR}api-logger/api-logger.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}api-logger/api-logger.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${LOGGER_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}api-logger/api-logger.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Prometheus cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$PROMETHEUS_CN" \
|
||||
-keyout ${CERTS_DIR}api-prometheus/api-prometheus.key \
|
||||
-out ${CERTS_DIR}api-prometheus/api-prometheus.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}api-prometheus/api-prometheus.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${PROMETHEUS_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}api-prometheus/api-prometheus.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Grafana cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$GRAFANA_CN" \
|
||||
-keyout ${CERTS_DIR}api-grafana/api-grafana.key \
|
||||
-out ${CERTS_DIR}api-grafana/api-grafana.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}api-grafana/api-grafana.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${GRAFANA_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}api-grafana/api-grafana.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Postgres cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$POSTGRES_CN" \
|
||||
-keyout ${CERTS_DIR}db-postgres/db-postgres.key \
|
||||
-out ${CERTS_DIR}db-postgres/db-postgres.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}db-postgres/db-postgres.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${POSTGRES_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}db-postgres/db-postgres.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Mongo cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$MONGO_CN" \
|
||||
-keyout ${CERTS_DIR}db-mongo/db-mongo.key \
|
||||
-out ${CERTS_DIR}db-mongo/db-mongo.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}db-mongo/db-mongo.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${MONGO_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}db-mongo/db-mongo.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Identity cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$IDENTITY_CN" \
|
||||
-keyout ${CERTS_DIR}identity-svc/identity-svc.key \
|
||||
-out ${CERTS_DIR}identity-svc/identity-svc.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}identity-svc/identity-svc.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${IDENTITY_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}identity-svc/identity-svc.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Basket cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$BASKET_CN" \
|
||||
-keyout ${CERTS_DIR}basket-svc/basket-svc.key \
|
||||
-out ${CERTS_DIR}basket-svc/basket-svc.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}basket-svc/basket-svc.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${BASKET_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}basket-svc/basket-svc.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Catalog cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$CATALOG_CN" \
|
||||
-keyout ${CERTS_DIR}catalog-svc/catalog-svc.key \
|
||||
-out ${CERTS_DIR}catalog-svc/catalog-svc.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}catalog-svc/catalog-svc.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${CATALOG_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}catalog-svc/catalog-svc.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Order cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$ORDER_CN" \
|
||||
-keyout ${CERTS_DIR}order-svc/order-svc.key \
|
||||
-out ${CERTS_DIR}order-svc/order-svc.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}order-svc/order-svc.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${ORDER_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}order-svc/order-svc.crt >/dev/null
|
||||
|
||||
|
||||
# Genearte Pricing cert
|
||||
openssl req -newkey rsa:2048 -nodes \
|
||||
-subj "/C=PL/ST=Silesia/L=Gliwice/O=Egommerce.dev/CN=$PRICING_CN" \
|
||||
-keyout ${CERTS_DIR}pricing-svc/pricing-svc.key \
|
||||
-out ${CERTS_DIR}pricing-svc/pricing-svc.csr >/dev/null
|
||||
|
||||
openssl x509 -req -days 365 \
|
||||
-in ${CERTS_DIR}pricing-svc/pricing-svc.csr -CA ${CERTS_DIR}ca-root/ca-root.crt \
|
||||
-extensions SAN -extfile <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=${PRICING_SAN}")) \
|
||||
-CAkey ${CERTS_DIR}ca-root/ca-root.key -set_serial 01 \
|
||||
-out ${CERTS_DIR}pricing-svc/pricing-svc.crt >/dev/null
|
3
deploy/scripts/remove-dangling-images.sh
Normal file
3
deploy/scripts/remove-dangling-images.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
|
11
deploy/scripts/start-docker.sh
Normal file
11
deploy/scripts/start-docker.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# RUN IT FORM THE REPO ROOT DIR
|
||||
|
||||
echo "Starting egommerce docker stack..."
|
||||
docker stack deploy --with-registry-auth --detach=false \
|
||||
--compose-file deploy/docker/stack.yml \
|
||||
--compose-file deploy/docker/stack.dev.yml \
|
||||
--compose-file deploy/docker/stack.dev.local.yml \
|
||||
egommerce
|
||||
|
||||
echo "Done."
|
12
deploy/scripts/start-k8s.sh
Normal file
12
deploy/scripts/start-k8s.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# RUN IT FORM THE REPO ROOT DIR
|
||||
|
||||
echo "Starting egommerce k8s stack..."
|
||||
|
||||
kubectl apply -f deploy/k8s/stack.yml
|
||||
# kubectl apply -f deploy/k8s/stack.prod.yml
|
||||
# kubectl apply -f deploy/k8s/stack.dev.yml
|
||||
# kubectl apply -f deploy/k8s/stack.dev.local.yml
|
||||
|
||||
|
||||
echo "Done."
|
45
deploy/scripts/vault-init-template.sh
Normal file
45
deploy/scripts/vault-init-template.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
vault secrets enable pki
|
||||
vault secrets tune -max-lease-ttl=87600h pki
|
||||
|
||||
vault write -field=certificate pki/root/generate/internal \
|
||||
common_name="ego.io" \
|
||||
ttl=87600h > CA_cert.crt
|
||||
|
||||
vault write pki/config/urls \
|
||||
issuing_certificates="https://127.0.0.1:8200/v1/pki/ca" \
|
||||
crl_distribution_points="https://127.0.0.1:8200/v1/pki/crl"
|
||||
|
||||
vault secrets enable -path=pki_int pki
|
||||
vault secrets tune -max-lease-ttl=43800h pki_int
|
||||
|
||||
vault write -format=json pki_int/intermediate/generate/internal \
|
||||
common_name="ego.io Intermediate Authority" \
|
||||
| jq -r '.data.csr' > pki_intermediate.csr
|
||||
|
||||
vault write -format=json pki/root/sign-intermediate csr=@pki_intermediate.csr \
|
||||
format=pem_bundle ttl="43800h" \
|
||||
| jq -r '.data.certificate' > intermediate.cert.pem
|
||||
|
||||
vault write pki_int/intermediate/set-signed certificate=@intermediate.cert.pem
|
||||
|
||||
vault write pki_int/roles/ego.io \
|
||||
allowed_domains="ego.io" \
|
||||
allow_subdomains=true \
|
||||
generate_lease=true \
|
||||
max_ttl="720h"
|
||||
|
||||
vault write pki_int/issue/ego.io \
|
||||
common_name="catalog.service.ego.io" \
|
||||
ttl="24h" | tee certs.txt
|
||||
|
||||
|
||||
# CONFIGURE CONSUL
|
||||
mkdir -p /opt/consul/agent-certs
|
||||
|
||||
grep -Pzo "(?s)(?<=certificate)[^\-]*.*?END CERTIFICATE[^\n]*\n" certs.txt | sed 's/^\s*-/-/g' > /opt/consul/agent-certs/agent.crt
|
||||
grep -Pzo "(?s)(?<=private_key)[^\-]*.*?END RSA PRIVATE KEY[^\n]*\n" certs.txt | sed 's/^\s*-/-/g' > /opt/consul/agent-certs/agent.key
|
||||
grep -Pzo "(?s)(?<=issuing_ca)[^\-]*.*?END CERTIFICATE[^\n]*\n" certs.txt | sed 's/^\s*-/-/g' > /opt/consul/agent-certs/ca.crt
|
||||
## FIXME ^^ invalid pattern flag...
|
||||
|
0
deploy/scripts/volumes-restart.sh
Normal file
0
deploy/scripts/volumes-restart.sh
Normal file
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
# RUN IT FORM THE REPO ROOT DIR
|
||||
|
||||
echo "Starting egommerce stack..."
|
||||
docker stack deploy --with-registry-auth \
|
||||
--compose-file deploy/egommerce-stack.yml \
|
||||
--compose-file deploy/egommerce-stack.dev.yml \
|
||||
--compose-file deploy/egommerce-stack.dev.local.yml \
|
||||
egommerce
|
||||
|
||||
echo "Done."
|
Loading…
Reference in New Issue
Block a user