mreferre / yelb Goto Github PK
View Code? Open in Web Editor NEWA sample application
License: Apache License 2.0
A sample application
License: Apache License 2.0
Hello, I'm going through this tutorial on AWS ECS and I'm at the point where I'm attempting to run docker compose up
with the ecs
context.
Everything is going well up until it attempts to start the yelb-ui container which results in failure consistently. The error I see in the logs is:
nginx: [emerg] host not found in upstream "yelb-appserver" in /etc/nginx/conf.d/default.conf:5
I've googled around and it seems like the consensus is that it's a startup issue and that yelb-appserver must start before yelb-ui. The solutions suggest to use depends-on
, but it would appear that's already being used in the docker-compose.yaml file. I'm not sure what else to do.
Thanks for sharing this cool project!
I've been trying out the various files under https://github.com/mreferre/yelb/tree/master/deployments/platformdeployment/Kubernetes/yaml
I'm using a Kubernetes cluster in my homelab, plain vanilla K8S on Alpine Linux.
I've been trying the various deployments that should work on a local cluster (not in the cloud) and none of them work. In all tests so far, the UI server fails to stay up.
The logs from the yelb-ui container tell me:
[emerg] 11#11 host not found in upstream "yelb-appserver" in /etc/nginx/conf.d/default.conf:5
It's true, the yelb-appserver container needs a while to startup, but even when it's up the yelb-ui container will say it can't find the appserver.
The deployment template for yelb-ui references image "nomisbeme/yelb-ui:0.6", which is an invalid image. Updating image name to "mreferre/yelb-ui:0.6" fixed the issue.
Steps followed:
git clone https://github.com/mreferre/yelb
cd ./yelb/deployments/platformdeployment/Docker/
ls
README.md docker-compose.yaml stack-deploy.yaml
Error
WARNING services.scale: unsupported attribute
WARNING services.scale: unsupported attribute
WARNING services.scale: unsupported attribute
WARNING services.scale: unsupported attribute
WARNING networks.driver: unsupported attribute
[+] Running 13/13
⠿ docker DeleteComplete 95.1s
⠿ RedisserverTaskExecutionRole DeleteComplete 15.1s
⠿ Cluster DeleteComplete 15.1s
⠿ YelbuiTaskExecutionRole DeleteComplete 15.1s
⠿ YelbnetworkNetwork DeleteComplete 15.0s
⠿ CloudMap DeleteComplete 90.1s
⠿ YelbuiTCP80TargetGroup DeleteComplete 14.0s
⠿ LogGroup DeleteComplete 14.0s
⠿ YelbdbTaskExecutionRole DeleteComplete 14.0s
⠿ YelbappserverTaskExecutionRole DeleteComplete 14.0s
⠿ YelbnetworkNetworkIngress DeleteComplete 7.0s
⠿ LoadBalancer DeleteComplete 7.0s
⠿ Yelbnetwork80Ingress DeleteComplete 7.0s
A load balancer cannot be attached to multiple subnets in the same Availability Zone (Service: AmazonElasticLoadBalancing; Status Code: 400; Error Code: InvalidConfigurationRequest; Request ID: 09fda1ca-a71b-4c98-9ed1-0cb0cbbc7ee5; Proxy: null)
I'm following steps for platformdeployment on Kubernetes using CDK8s using below npm commands
npm install
npm run compile
But I'm not able to get Kubernetes yaml file in the dist folder.
singwvin@3c06304afcb0 cdk8s % npm --version
8.19.2
singwvin@3c06304afcb0 cdk8s % npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: "Please update to latest v2.3 or v2.2"
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)
added 680 packages, and audited 688 packages in 8s
26 packages are looking for funding
run npm fund
for details
2 moderate severity vulnerabilities
To address all issues, run:
npm audit fix
Run npm audit
for details.
singwvin@3c06304afcb0 cdk8s % npm run compile
[email protected] compile
tsc
singwvin@3c06304afcb0 cdk8s % ls
README.md cdk8s.yaml imports main.d.ts main.test.d.ts main.test.ts node_modules package.json
snapshots help jest.config.js main.js main.test.js main.ts package-lock.json tsconfig.json
singwvin@3c06304afcb0 cdk8s %
It gives error:
yelb-db_1 | runtime: failed to create new OS thread (have 2 already; errno=22)
yelb-db_1 | fatal error: newosproc
I'm running on "localtest" deployment using docker-compose. My local environment is MacOS Monterey version 12.6 Chip: Apple M1.
Need to add * after / in ingress config portion of YAML.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: yelb-ui-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: yelb.ing.corp.local
http:
paths:
- path: /*
backend:
serviceName: yelb-ui
servicePort: 80
Hi @mreferre,
I’m Afonso and I came across your repo and I took the liberty to scan it with the tool that I am currently developing. If I caught your attention, feel free to take a look at the following diagram and let me know your thoughts on this. I am really interested to get your feedback and understand if the diagram we presented matches the architecture you have in mind.
After the sucessful deployment of the CFN the Application work fine as expected. On restart of the app server, we tried to re run the yelb-appserver.sh with the internal IP , but the application throwing error as the app server is looking at 127.0.0.0 for both PG and redis.
Why is the application not able bind to the right IP after restart
When running helm install I received this error:
Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"
Upon changing the version to "apps/v1", I then received the error:
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec
I updated the Deployment spec with selector as such:
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "yelb.fullname" . }}-cache
spec:
selector:
matchLabels:
app: {{ template "yelb.fullname" . }}
replicas: {{ .Values.replicaCount }}
--- etc ---
Then I was able to successfully deploy the chart
Hello,
I was wondering if possible to deploy using service connect and not using awsvpc network?
Hi,
We are deploying the Cloudformation template to deploy yelb in an ECS cluster running on EC2.
The template is timing out at the creation of Services in the cluster for UI, App, Redis and DB.
On checking the ECS cluster we found that there were no Container Instances launched.
Are we missing something in the CFN? Because the 4 services failed due to a lack of container instances.
Could you please help us with this issue.
Thanks
Hi.
a docker pull of the yelb-db docker images will fail.
0.5: Pulling from mreferre/yelb-db
3e17c6eae66c: Pulling fs layer
[...]
e7955dbcd645: Waiting
error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/89/8926f16199a8826c4421c48cd6557881112dbb260838c70c5486b8c6d536f975/data?verify=1577484021-l4Ql8suLKdK%2Fst9EkSO41VIFhek%3D: x509: certificate has expired or is not yet valid
All other docker images like yelb-ui still work.
Cheers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.