New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds missing steps for installation on MacOS X #791
Conversation
INSTALL.md
Outdated
@@ -176,3 +184,16 @@ Start up the rails server by running the following command: | |||
$ UNICORN_WORKERS=2 rails server -b 0.0.0.0 # Runs the server, available at localhost:3000 | |||
``` | |||
> The number of unicorn workers is variable and sometimes it will need more than 2. In case the server is slow or start suffering from timeouts, try restarting porta with a higher number like 8. | |||
|
|||
Set the domain for the Master, Provider & Developer portals via the rails console. Whichever hostname being used for the local machine should be the value set for each attribute (the following domain names are just examples and updating the */etc/hosts* file is also required): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessary at all. It creates the domains by default. It is still ok to do it and mention it somewhere if you want, but this is not part of the installation so it shouldn't be in INSTALL.md
, and anyway it is important to say clearly that this step is optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah okay yes it should be optional, it creates the domains but they cannot be used, they are just example.com, is there another README where this step would be more appropriate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevprice83 What do you mean that they can't be used? 😱 They should be able to be used. I can use them:
Tenant
Master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well the accounts were created in my case with the following domains: master-admin.example.com, provider-admin.example.com, provider.example.com so these were obviously never going to work unless they are added to the /etc/hosts. Did you pass a param when starting up the rails server to add .lvh.me? @Martouta
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .lvh.me resolves itself and all its subdomains to 127.0.0.1
. So you don't need to setup your own DNS or change your /etc/hosts
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didier is right 😄 And anyway you can change the example.com
anyway by an ENV THREESCALE_SUPERDOMAIN
or making a config/settings.yml
with this with the default you want:
porta/config/examples/settings.yml
Line 2 in 04e65ef
superdomain: <%= superdomain = ENV.fetch('THREESCALE_SUPERDOMAIN', 'example.com') %> |
And the
.lvh.me
is because we don't want to resolve to real URLs in development and we used to use .dev
but we had problems with it for an update of Chrome so now we use this one, as you can customise as well if you want to (but only if you know well what you are doing):porta/config/examples/settings.yml
Line 41 in 04e65ef
dev_gtld: <%= ENV.fetch('DEV_GTLD', 'lvh.me') %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood @Martouta @didierofrivia I'll make the change, I didn't know this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as you have internet or a DNS server setup correctly with .lvh.me
pointing to 127.0.0.1
But I think that is out of topic for the README, we can do a Pro-tip
What would be good is to begin to have wiki page for those pro-tips instead of files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I just wasn't aware that lvh.me
was a standard DNS entry mapped back to 127.0.0.1
I think this could be fine in another wiki or README I suppose.
Run [NPM](https://www.npmjs.com/) to install all the required Node modules: | ||
|
||
```bash | ||
npm install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if that note at the end is ideal but I guess it won't hurt 😄
LGTM 👍
Preferably wait for one more review if it comes in few days 😝 |
INSTALL.md
Outdated
@@ -176,3 +184,5 @@ Start up the rails server by running the following command: | |||
$ UNICORN_WORKERS=2 rails server -b 0.0.0.0 # Runs the server, available at localhost:3000 | |||
``` | |||
> The number of unicorn workers is variable and sometimes it will need more than 2. In case the server is slow or start suffering from timeouts, try restarting porta with a higher number like 8. | |||
|
|||
**NOTE:** 3scale porta will resolve all subdomains locally through use of `.lvh.me` domain extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably add an example.
When you seed the application with rake db:setup
it will create the provider account and the master account, respectively accessible through, http://provider-admin.example.com.lvh.me:3000
and http://master-account.example.com.lvh.me:3000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this note would be better right after the db:setup
command, and mentioning also that password should wrote down at that moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's a good point @josemigallas as I did have to reset password having missed that output on the terminal. I can also add an example of the domains which are seeded @hallelujah
Please also sign all the commits the next time you push 😄 |
Codecov Report
@@ Coverage Diff @@
## master #791 +/- ##
==========================================
- Coverage 92.9% 92.87% -0.03%
==========================================
Files 2414 2397 -17
Lines 78251 78057 -194
==========================================
- Hits 72696 72499 -197
- Misses 5555 5558 +3
Continue to review full report at Codecov.
|
@Martouta I signed my latest commit but not sure of how to sign all the existing commits, is that still necessary for this PR? |
@kevprice83 all commits must be signed. |
77a15de
to
ba691fd
Compare
ba691fd
to
23d80ca
Compare
@didierofrivia all the commits are signed correctly now right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 💪
What this PR does / why we need it:
Some steps are missing in the installation guide for MacOS.
Which issue(s) this PR fixes
THREESCALE-2489