Im having so much trouble deploying my Prisma serv...
# orm-help
j
Im having so much trouble deploying my Prisma service. Is there an idiot proof guide anywhere? Im not having much joy with the docs šŸ˜ž
n
What issues are you encountering?
j
At step 14 here I have different options: https://www.prisma.io/docs/tutorials/deploy-prisma-servers/digital-ocean-(docker-machine)-texoo9aemu I posted this in the forum and Nilan told me to set up the server manually and add my endpoint https://www.prisma.io/forum/t/deploying-cluster-to-digital-ocean/3483 Is ā€œtcp://104.131.82.38:2376ā€ my endpoint?
Copy code
$ docker-machine ls
NAME     ACTIVE   DRIVER         STATE     URL                        SWARM   DOCKER        ERRORS
prisma   *        digitalocean   Running   <tcp://104.131.82.38:2376>           v18.05.0-ce
I need to know what to enter here:
Copy code
$ prisma init hello-world
? Set up a new Prisma server or deploy to an existing server? Use other server
? Enter the endpoint of your Prisma server
n
Ah, sorry. I've never had any success with deploying to DO. If you decide to abandon and work on deploying to AWS, ping me
j
I was only going the DO route as id heard it was easier. I ran into trouble with aws too but ill try again. Would you reccomend aurora or MySQL?
n
aurora
j
Is it a requirement (or does it make it much easier) to use Prisma Cloud if you’re going with AWS?
Also im not sure how to add my aurora db. The docs say to click on clusters in prisma cloud but I dont have this option. Is ā€œserversā€ the same thing? https://www.prisma.io/docs/tutorials/deploy-prisma-servers/prisma-cloud-ua9gai4kie
j
The whole thing with prisma has been confusing. Connecting databases. Deploying. Docker.
n
I think the way you are seeing things might be the problem
so you have 1. Your Datastore - Prisma sits on top of this to give you a fairly robust API to interact with your datastore. This is somewhat like an ORM 2. You GraphQL Server - this lives in the same repo as your datastore code (Types, schema, etc...), but is actually a separate thing. When using the graphql-cli you get the
src
and
database
dirs in your root dir, but they are not "directly" related. This means you also need to deploy your API layer (what's in
src
) seperately.
So I handle things in the following way: 1. Configure and deploy datastore through AWS RDS 2. Generate a new app using the
graphql-cli
3. Set up Prisma Cloud 4. Deploy API (
/src
) to Lambda, EC2, Now - depending on my requirements
Hopefully that was helpful, if not, let me know and I can try to explain more
j
I think I understand the concept of the 2 servers, at least at a high level. But I have almost no experience with the networking side of things (I’m front-end normally). I’m afraid I’m stuck at step 1- configuring the Datastore. Ive created an Aurora DB in the AWS console but how do I deploy Prisma to it? Im planning on using Now for the GraphQL Server to make things easier so hopefully step 1 is the hard part šŸ¤ž. Thanks again!
n
@Jim - you aren't deploying Prisma to the data store
Prisma is a layer that sits directly on top of the data store
now you can just deploy prisma with prisma cloud
what is your org name in prisma cloud?
j
@noahdavis I’ve PM’d you
j
Sorry for hijacking your thread Jim... but to clarify this. You need a database - AWS RDS , in my case I’m waiting for mongodb . The prisma api (requires docker? Is there a way to use without docker?). Then the graphql server itself? So you’ll need 1 ec2 server for the prisma part and another ec2 / lambda for graphql server itself. Then for the front end, you would need to deploy that as well? I haven’t touched server side rendering but I’m assuming you’ll need another ec2 for that as well. So all in all you need 1 ec2 with the prisma docker for sure. Then lambda /ec2 for graphql. The database. Front end. So what does prisma cloud exactly do?
n
Prisma Cloud connects to@your DB and deploys the Prisma API that generates when you run prisma deploy. You do not need prisma cloud for this, but it comes with a really nice set of features that make managing all of this easier. And some nice stats.
@Jscott388