# Check your setup!
We are never safe from a mishap in the setup. To detect it as early as possible, try out your setup!
# Run Gutenberg
Gutenberg is Marfeel's server. It is developed and maintained by core teams, and must be running in your local environment to start the onboarding training.
Place yourself inside Gutenberg folder and compile everything:
cd ~/Marfeel/Gutenberg
mvnc
TIP
mvnc
is Marfeel's shortcut for mvn clean
, with a few other useful options.
Once this command is done, from anywhere in the command line, start the server with the following command:
$ mrf-gutenberg
...
[INFO] [talledLocalContainer] 28-Nov-2019 12:45:38.659 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
[INFO] [talledLocalContainer] 28-Nov-2019 12:45:38.675 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8442"]
[INFO] [talledLocalContainer] 28-Nov-2019 12:45:38.677 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
[INFO] [talledLocalContainer] 28-Nov-2019 12:45:38.682 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 40767 ms
[INFO] [talledLocalContainer] Tomcat 8.x started on port [8080]
[INFO] Press Ctrl-C to stop the container...
Compilation and start-up should take a few minutes. It is successful once you get an output similar to the one in the code block.
Marfeel command line
Glue wraps most of the command-line tools at Marfeel.
The rest of Marfeel command-line tools start with mrf-
.
In both cases, you can use the command with the -h
option to see the help.
For example, mrf-gutenberg -h
shows all the options to run the server.
# Nginx
Nginx (pronounced "engine X") (opens new window) is a proxy Gutenberg uses. It should automatically run as a background service, but might be stopped after restarting your computer.
Check if it is already running:
$ sudo brew services list
Password:
Name Status User Plist
...
nginx started root /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
...
WARNING
If the "started" status is yellow/orange, it means the status is unknown to Brew, and this might still be a problem. Check the nginx section of the common issues guide.
# Install your first tenant
- From a new terminal tab, install the first Media Group we will use for the onboarding sessions:
$ glue clone Training-Mediagroup
Looking for token: /Users/user/.mrf/insightToken.txt
Received 1 git repositories to process
Cloning repository: git@github.com:Marfeel/Training-Mediagroup.git into /Users/user/Marfeel/ProTenants/Training-Mediagroup
Cloning into 'Training-Mediagroup'...
remote: Enumerating objects: 218, done.
remote: Counting objects: 100% (218/218), done.
remote: Compressing objects: 100% (144/144), done.
remote: Total 218 (delta 102), reused 136 (delta 54), pack-reused 0
Receiving objects: 100% (218/218), 52.60 KiB | 708.00 KiB/s, done.
Resolving deltas: 100% (102/102), done.
Symlink creation /Users/user/Marfeel/ProTenants/Tenants/vhosts/Training-Mediagroup // /Users/user/Marfeel/ProTenants/Training-Mediagroup
...
Make sure Gutenberg is running in a separate tab/window!
From the terminal, move to the newly cloned Media Group folder, and run the commands:
cd /Users/user/Marfeel/ProTenants/Training-Mediagroup/thedrum.mrf.io
git checkout training-theming-styling-start
jinks --build
glue invalidate:section
TIP
Later on, jinks --custom
is enough to start working on a tenant. You must build
for your first time though, to install all the required dependencies.
- After execution, open the tenant you compiled in your browser with the following command:
$ glue open
Opened Touch with URL:
http://localhost.marfeelcache.com/hub/origin/thedrum.mrf.io/index?marfeeldev=true&marfeelgarda=off
In case of error
Check the common issues guide for the error you get. Check with your buddy or tech lead if you have difficulties.
Help us improve the onboarding experience by always mentioning the errors or additional steps that you had to take.
# SSL in local
Local Marfeel sites must work with https
.
This is important to load and debug advertising, as well as to load the AMP version of Marfeel sites.
After having successfully opened the training tenant with http
, do check that it also works with https:
**https**://localhost.marfeelcache.com/hub/origin/goalcast.mrf.io/index?marfeeldev=true&marfeelgarda=off
If it doesn't work, from anywhere in the console, run:
mrf-env -n
Which copies the nginx
configuration to your environment and adds the certificate to the keychain.
Make sure it ran successfully:
- Open "Keychain Access" in your mac
- Find "Marfeel Development Certificate" on the list.
In the case the certificate is missing:
- Manually copy it from
MarfeelXP/Jinks/conf/nginx/certs/dev-cert.pem
to the keychain. - In the keychain window, right-click the certificate and choose
Get Info
. - in the
Trust
tab, the optionWhen using this certificate
must beAlways trust
.
And now, enjoy your secure navigation!
# GitHub authentication
Marfeel codebase is entirely on GitHub and Nexus. All Marfeelers must have their .npmrc
file and SSH configured with their account.
At the end of mrf-env -a
, make sure they are well configured.
# Npmrc Configuration
To be able to download from Marfeel Nexus package repository.
- Check the
.npmrc
file exists and has content:
$ cat ~/.npmrc
@marfeel:registry=https://repositories-proxy.mrf.io/nexus/repository/npm-all
If this is not the case, run:
$ mrf-env -N
# SSH
Marfeel repositories are cloned using the SSH instead of HTTPS. A successful configuration means you don't have to type your username and password for any operation.
- Check that ssh is configured for Github with your Marfeel GitHub username:
$ ssh -T git@github.com
Hi marfeelGithubUsername! You've successfully authenticated, but GitHub does not provide shell access.
It should contain several files.
- Next to where
MarfeelXP
is in your system, try to clone the DemoTenants repository using ssh:
$ cd ~/marfeel
$ git clone git@github.com:Marfeel/DemoTenants.git
Cloning into 'DemoTenants'...
remote: Enumerating objects: 179, done.
remote: Counting objects: 100% (179/179), done.
remote: Compressing objects: 100% (102/102), done.
remote: Total 182613 (delta 86), reused 139 (delta 59), pack-reused 182434
Receiving objects: 100% (182613/182613), 142.94 MiB | 12.03 MiB/s, done.
Resolving deltas: 100% (102653/102653), done.
Updating files: 100% (32803/32803), done.
If one of those steps is unsuccesful, running:
$ mrf-env -u
############################### GitHub SSH certificates ###############################
Enter your MARFEEL GitHub user.
...
Will guide you through configuring your SSH certificate for Github.
References: