For reasons I still do not understand, once I start the app I don't see any controls(buttons, inputs and so on)
At first I suspected this was because .js files weren't properly built. After upgrading nodejs to the latest version and installing required development libraries plus bit of code I've managed to created required .js files.
I am going back to the production ENV of the app I have setup to try and observe the differences.
[07/31/15 12:58:08] [DEBG] Initializing user api routes[07/31/15 12:58:08] [DEBG] Initializing team api routes[07/31/15 12:58:08] [DEBG] Initializing channel api routes[07/31/15 12:58:08] [DEBG] Initializing post api routes[07/31/15 12:58:08] [DEBG] Initializing web socket api routes[07/31/15 12:58:08] [DEBG] Initializing file api routes[07/31/15 12:58:08] [DEBG] Initializing command api routes[07/31/15 12:58:08] [DEBG] Parsing server templates at /go/src/github.com/mattermost/platform/api/templates/[07/31/15 12:58:08] [DEBG] Initializing web routes[07/31/15 12:58:08] [DEBG] Using static directory at /go/src/github.com/mattermost/platform/web/static/[07/31/15 12:58:08] [DEBG] Parsing templates at /go/src/github.com/mattermost/platform/web/templates/[07/31/15 12:58:08] [INFO] Starting Server...[07/31/15 12:58:08] [INFO] Server is listening on 8065[07/31/15 12:58:12] [DEBG] /[07/31/15 12:58:13] [DEBG] /api/v1/users/me
Installation from package:
[07/31/15 12:58:28] [DEBG] Initializing user api routes[07/31/15 12:58:28] [DEBG] Initializing team api routes[07/31/15 12:58:28] [DEBG] Initializing channel api routes[07/31/15 12:58:28] [DEBG] Initializing post api routes[07/31/15 12:58:28] [DEBG] Initializing web socket api routes[07/31/15 12:58:28] [DEBG] Initializing file api routes[07/31/15 12:58:28] [DEBG] Initializing command api routes[07/31/15 12:58:28] [DEBG] Parsing server templates at /opt/gitlab/embedded/service/mattermost/api/templates/[07/31/15 12:58:28] [DEBG] Initializing web routes[07/31/15 12:58:28] [DEBG] Using static directory at /opt/gitlab/embedded/service/mattermost/web/static/[07/31/15 12:58:28] [DEBG] Parsing templates at /opt/gitlab/embedded/service/mattermost/web/templates/[07/31/15 12:58:28] [INFO] Starting Server...[07/31/15 12:58:28] [INFO] Server is listening on 8065[07/31/15 12:58:35] [DEBG] /
@marin Have you tried using the makefile? There is make run if you just want to get it going. There is also a make dist which gives you a mattermost.tar.gz which you can then run by calling ./platform from the bin directory. You can pass it the appropriate configuration file by specifying -config=../your_config_file.json. So: ./platform -config=../your_config.json
@christopher1 I have, I used that when I installed the production server manually.
I've already built the binary using go build mattermost.go and I start it up by using bin/mattermost -config config.json. The app starts but js files are not being loaded just yet for some reason I am trying to discover.
I haven't done these steps and that is where the issue lies. bundle.js has been minified and it is now bundle.min.js. Having to change change the name of this on every build will be extremely error prone. Is there any way to try loading both bundle(.min).js file in the code directly so we can skip sed commands?
The versioning of the bundle files is to force browsers to update the file when the code on the server changes. It will work to rename them, but you will break that functionality. What is the problem with running the sed commands?
The versioning of the bundle files is to force browsers to update the file when the code on the server changes.
I understand, Rails has this out of the box.
What is the problem with running the sed commands?
If you load bundle.js in some other file then you will need to sed that one and it then grows with app growth. When sed fails during build(usually running against a deadline), hunting why it went wrong there is usually a frustrating experience.
This line has file named build.txt . Is it possible to append the build number read from that file to bundle.js and try to read that file?
For example, in rails I would do something like this:
version=File.exist?("build.txt")?File.read("build.txt").chomp:nil#this would produce string with build number or nil# and then I could do something like this<scriptsrc="/static/js/bundle#{version}.js"></script>
I would then be able to just generate/read from build.txt to supply the correct .js file. And if no build.txt is supplied I would default back to bundle.js.
RC2 is coming out on Monday. Sorry, we haven't yet documented our release process, or announced that these are coming. Hopefully, it'll be easier with them?
I suspect this would have been helpful if I knew about it earlier but I already made a lot of progress with packaging. I've uploaded this package to give you an example of where I am at the moment. There is still a lot of work to do like connecting to redis, setting up configuration options and so on, but I can already boot up Mattermost on the instance. If you are interested you can do it by:
# download and install the package(Ubuntu 12.04) wget https://s3-eu-west-1.amazonaws.com/omnibus-builds/ubuntu-12.04/gitlab-ce_7.13.1%2B20150731185059.git.51.9047111-ce.0_amd64.debdpkg -i gitlab-ce_7.13.1+20150731185059.git.51.9047111-ce.0_amd64.deb# reconfigure the packagesudo gitlab-ctl reconfigure# login as the mattermost usersudo-u mattermost -i bash# navigate to the mattermost directorycd /opt/gitlab/embedded/service/mattermost/# start it/opt/gitlab/embedded/bin/mattermost -config /var/opt/gitlab/mattermost/config.json
You should be able to see Mattermost at IPADDRESS:8065
Like I said above, there is still work to do but by building mattermost from scratch I've managed to gain some knowledge about the app itself. I am going for a vacation but once I get back, few dedicated days behind the screen and we should have this ready for beta :)
Short update: I've picked up where I left off and currently adding settings to populate config.json. I've also added controls to stop/start/restart mattermost via the command line and rewrote the build to use prebuilt binary provided by Mattermost.
For now I am just adding the configuration options from config.json without trying to understand what they do. At some point this will need to be documented.
@it33@christopher1 Can either of you provide some details on the SSO integration? I need to know what parameters are expected for AuthEndpoint, TokenEndpoint, UserApiEndpoint in config.json (just example without too much details is enough for now). I can dive into the code to figure it out but I figured I could use a shortcut here :)
Another question to confirm: these keys and this key need to be unique for each Mattermost installation? Do they also need to be backed up, ie. changing any of those will have consequences for end users?
They also should be backed up. The consequences of losing the first three are not so bad. All current invite or password reset links would be invalidated. However the forth key is used to encrypt parts of the database and losing it would render those parts unreadable.
@christopher1@it33 rc2.1 packages were released yesterday at our package repository that have Mattermost bundled. I've also added some basic documentation on how to install and configure Mattermost. Please let me know if you have any remarks or create a new issue if you are experiencing problems. In the meantime, I will find this issue resolved.
We will also have to discuss how we will handle communication regarding new releases/configuration changes/structure changes to Mattermost that might require changes in the package.
Thanks @marin! Wonderful news! In terms of communication, we're open to options.
Perhaps Mattermost team can file a ticket when it seems appropriate to offer a new GitLab Mattermost release, which should include changelog and documentation on necessary config changes, and GitLab can decide whether to take the build?
We'll bundle Mattermost with GitLab so people have a great alternative.
Unfortunately, now that Mattermost is bundled, my organization will be unable to use Gitlab due to the AGPL/Commercial license of Mattermost. This issue mentions HipChat being closed source, yet the solution is to bundle a piece of software that will keep organizations from being able to customize/alter their implementation.
@LongLiveCHIEF Mattermost (/cc @it33) will give us a different license. @it33 can you ensure this new license ends up in 8.0? How will we communicate this license?
@LongLiveCHIEF, @sytses There is a ticket in Mattermost to add the license to a special build for GitLab Mattermost with this included but it didn't get in for Beta1, for now I can open a ticket to replace the license files manually. Traveling right now, will add this end of today. There is an FAQ in forum.mattermost.org in GitLab Mattermost that tracks the ticket.
Sorry about the delay, the ticket for adding the license automatically to the GitLab Mattermost via our build process got missed as we migrated from a private issue tracker to a public issue tracker this month.
To communicate the switch to MIT License, and to announce other features for GitLab Mattermost, perhaps the GitLab 8.0 announcement could link to Mattermost Beta1 announcement?
Announce also includes thank yous to many GitLab community members who influenced the release, and the future of Mattermost,
It sounds like Mattermost is AGPL/Commercial, but that you have a version of it, that you're calling "Gitlab Mattermost", which is MIT?
If that's correct, then the fact that you've renamed the distribution to Gitlab Mattermost (along with the license), should resolve any concerns about not being able to use Gitlab or even the new Gitlab Mattermost bundled feature.
If that helps you, then keep that in mind when discussing Mattermost/Gitlab Mattermost in announcements, as using that distinction consistently will help ensure any orgs that don't allow use of AGPL won't have trouble convincing their legal teams that they're different packages.