Configuring Gitlab review app - gitlab

I am trying to configure Gitlab review apps in my Ubuntu 14 server. First I want at least to makes work the example explained here also, installed gitlab runner, and configured one as said here
I have a subdomain pointing to the IP of my server, let's say mysubdomain.domain.com I changed that in the nginx file.
Now, when I open MymergeReq.mysubdomain.domain.com nothing happens, I get: server not found.
If I open subdomain.domain.com I get the Nginx default index page.
My question is, where should I download that repo to make it work? I tried in /usr/share/nginx/html but the same, I think that I am missing some glue in all those things and I cannot find what is.
In the proposed Nginx file, in that tutorial, where they refer to the original place of the repo? or at least the .gitlab-ci.yml file?

The reason MymergeReq.mysubdomain.domain.com isn't working is due to the fact you have not set a wildcard DNS record for *.mysubdomain.domain.com is my guess.
The .gitlab-ci.yml file should be that of your project.

Related

Azure does not update files on a web server (Pyramid wsgi-app)

I have a project Pyramid Application. I store it on git and pull the branch to the server when I need update. Until now I was working on Koding but lately decided to check out azure and it's developer's benefits.
After I've created ubuntu server virtual machine (which actually is what runs under Koding) I've downloaded my project using git pull, but forgot to change the branch to the one I'm working on atm. So I did, but server still shows me the old page (like I didn't checkout the other branch). So I checked sftp and files show me they have been updated.
Why am I still seeing the old page?
Now I know the reason why! (at least I think, but please. correct me if I'm wrong)
I noticed that there was .pyc file for every .py file, and those are "compiled" (bit of simplification?) python files as I understood it. And it seemed to me that they were not "compiled" on app launch. But they compiled with setup.py... edit dates suggest that.
So the reason why I didn't see the changes I did in code was that... http.server was using old "compiled" files instead of the source files! But is that normal/expected behaviour? Dunno. There are many other quetions now, but main question was answered so I mark this as answer until someone gives better answer.

Where to find GitLab installation directory?

I am setting up a SSL certificate on my GitLab installation. I am trying to find the root directory to upload a file ( for ssl validation via http ) but I am not sure where is the Gitlab root Dir.
Kindly, point me to where to look or find it?
Directory structure
Omnibus-gitlab uses four different directories.
/opt/gitlab holds application code for GitLab and its dependencies.
/var/opt/gitlab holds application data and configuration files that gitlab-ctl reconfigure writes to.
/etc/gitlab holds configuration files for omnibus-gitlab. These are the only files that you should ever have to edit manually.
/var/log/gitlab contains all log data generated by components of omnibus-gitlab.
Omnibus-gitlab and SELinux
Although omnibus-gitlab runs on systems that have SELinux enabled, it does not use SELinux confinement features:
omnibus-gitlab creates unconfined system users;
omnibus-gitlab services run in an unconfined context.
The correct operation of Git access via SSH depends on the labeling of /var/opt/gitlab/.ssh. If needed you can restore this labeling by running sudo gitlab-ctl reconfigure.
Depending on your platform, gitlab-ctl reconfigure will install SELinux modules required to make GitLab work. These modules are listed in files/gitlab-selinux/README.md.
NSA, if you're reading this, we'd really appreciate it if you could contribute back a SELinux profile for omnibus-gitlab :) Of course, if anyone else is reading this, you're welcome to contribute the SELinux profile too.
Source
Thanks to #Drew Blessing who pointed me to read on omnibus. I end up using a different method for SSL validation so I didnt need to upload a file to the root directory of GitLab.
If I understand correctly, you are trying to place an HTML file so your SSL CA can validate your domain ownership. This will not be possible with the way Nginx is configured within the Omnibus package. All requests are routed to Unicorn (the backend server).
Can you use another method to validate your ownership, such as DNS record, whois contact email, etc?
For GitLab CE Omnibus package, it's /home/gitlab/
For previous stand alone version, it's /home/git/ by default.
I don't know what kind of file you are trying to upload, but usually, people usually do not upload file to gitlab's folder.
SSL cert goes to /etc/ssl/localcerts
Config files are located at /etc/gitlab for Omnibus package
/home/git/gitlab for prev stand alone version

Linode + Debian + Apache, a private folder for development work

I'm very new to Linux, please bear with me.
I have a linode with a LAMP stack running and I managed to configure my main site and a couple of subdomains and it's working great.
However, I want to have a dir called "dev" where I can put projects that I'm still working on. I need to be able to access this folder from my browser's address bar, and I don't want it to be through a DNS, but directly from my server's IP. For example:
http://218.42.42.42/dev/someproject
Since the document root is set to /var/www, placing the "dev" folder there isn't really an option - I want it to be in my ~ folder, for easier backups.
So what's the best way to make this work? A redirect, or should I move my doc root to the "dev" folder?
Thanks!
First, this would probably be more appropriate for Serverfault. With that in mind...
If I had to keep my dev environment in my home folder, I'd create a symlink in /var/www that ties to the dev folder.
As far as securing it, I don't know if this is still a recommended or viable way of handling secure access, but it seems like http://www.codinglogs.com/blog/server-management/vps-setup-guide/nginx-password-protect-web-directory might be the way to go as long as you feel secure using a username/password combination. Another valid answer (also on stackoverflow) would be password protect /backoffice folder in nginx.
If you want something more secure, the next step would probably firewall rules.

apex 4.0.1 not working

I recently upgraded to apex 4.0.1
but when I access 127.0.0.1:8080/apex and login it the page doesn't respong
and another thing ... the page is supposed to have some photos but it doesn't appear
so when I view the source code of the page and open any of the JS files / photos directories / css files
I get this
404 Not found
Not found
The requested URL /i/css/apex_4_0.css was not found on this server
I have ubuntu 11.04
There's two steps to the upgrade. The first is (mostly) installing the APEX_040000 objects. The second uploads a bunch of files into the database.
Make sure you carried out the second step correctly as documented
It is two steps because, if you are using the Oracle Apex Listener or HTTP Server then you'd put those files on a file system somewhere, rather than in the database.
It sounds like your config file is messed up in some way. Check the configuration to verify that it is directing traffic on port 8080 to the correct directory. Here is a link to how to find the Apache config file and how to read it:
http://www.unix-girl.com/geeknotes/apache_virtual_host_conf.html
The only other thing I can think of is that the directory does not exist. Maybe it got deleted or moved.

Website Versioning Practices

I tried searching, but I couldn't really figure out the best search terms to find my answer.
I have a Ubuntu 10.04 server with Apache. I want to set up a site that will be versioned, so my file structure will look like:
/var/www/MyApp1.0
/var/www/MyApp1.1
/var/www/dev -> /var/www/html/MyApp1.1
/var/www/test -> /var/www/html/MyApp1.0
Where "dev" and "test" are symbolic links to the other folders. So my URL for those two environments will be "http://my-url.com/dev" or "http://my-url.com/test". For my prod environment, I want the URL in the browser to be just "http://my-url.com", without redirecting to something like "http://my-url.com/prod".
How can I set it up so that the base URL points to a specific version without a redirect changing the URL?
By the way, we use MS SourceSafe for version control, so we have older versions backed up as well, but I need multiple environments for dev, test, and prod.
Thanks,
Travis
I think you can just check out the right development version to each of your dev, test and 'live' folder. I think it would be easier to just get the right version into the dev folder, than change the symbolic link. Ofcourse you could create a .htaccess file that redirects /dev to a specific version folder, but doing this will just cause you to keep a large amount of different folders for different versions, while what you should be doing is put the website in a version control system, develop features and commit them, update the test folder, and if everything's alright, update your production folder as well.
To do this right you may need to drop SourceSafe.

Resources