Reputation: 2488
i have opensfhit account and i am setting up my application which required more space than 1GB. as stated in this link , each gear has 1GB memory space. and maximum of 3 gears allowed. is it possible to combine 3 Gears into 1 Gear which can have 3GB of space. currently i am in free plan, and having 1 gear with 1GB space, which has two cartridges Jboss and Postgresql database. Both combined is taking more than 1GB. so i cant deploy the application due to space constraint.. any direction would really help me.
Edit :-
I have created the scaled application in free plan, and as per openshift document, each gear can max hold 1GB space, and in my case , 2 Jboss (scaled) , load balancer, 1 psql database, so one gear will have(Jboss + load balancer) combined 1GB, 2nd gear postgresql 1GB space, and 3rd gear Jboss 1GB (scaleable).
Note :- in above case, minimal allowable gears to scale will be 2 and not 3, since one gear already allocated to database. But maximum allowed gears are 3 for scalling, and i don't know how it works.
From openshift admin panel - JBoss Application Server 7 using 2
OpenShift is configured to scale this cartridge with the web proxy HAProxy. OpenShift monitors the incoming web traffic to your application and automatically adds or removes copies of your cartridge (each running on their own gears) to serve requests as needed.
Control the number of gears OpenShift will use for your cartridge:
Minimum 2 (dropdown) and Maximum 3 (dropdown) small gears
Each scaled gear is created the same way - the normal post, pre, and deploy hooks are executed. Each cartridge will have its own copy of runtime data, so be sure to use a database if you need to share data across your web cartridges.
Upvotes: 2
Views: 2447
Reputation: 1191
I ran into the same issue and found that this was not well documented or at least not intuitively described, since 3*1GB initially seems to imply that you might just have 3GB total disk space, which is not quite the case.
Here is a quote from the documentation on scalable applications (if it is not scalable you only have 1 Gear anyways):
The HAProxy cartridge sits between your application and the public internet and routes web traffic to your web cartridges. When traffic increases, HAProxy notifies the OpenShift servers that it needs additional capacity. OpenShift checks that you have a free gear (out of your remaining account gears) and then creates another copy of your web cartridge on that new gear. The code in the git repository is copied to each new gear, but the data directory begins empty. When the new cartridge copy starts it will invoke your build hooks and then the HAProxy will begin routing web requests to it. If you push a code change to your web application all of the running gears will get that update.
Source: https://developers.openshift.com/en/managing-scaling.html (in section "How Scaling Works"
To summarise: GIT data is copied across all gears, so you have 3 times 1GB of the identical GIT data. @mbaird pointed out that this is not true for user data, which is not replicated. Also, depending on your cartridge, in a scaled application your database might be on a separate gear.
For static content hosting it seems like that if you need more disk space or INodes you have to change to a different plan or spread your data across multiple applications.
Upvotes: 1
Reputation: 200476
If you deploy as a scaled application then the database would reside on a separate gear from your JBoss application, so the database would have 1GB of disk space all to itself. So you would basically have 1GB for your DB, and 1GB for JBoss. If that isn't enough then you would have to upgrade to a paid plan in order to have more disk space available on an individual gear.
Upvotes: 1