For my one project I use greenlight
first, I installed greenlight on the server but I want to customize the landing page but I don't how to do it. so I installed rails application in my server, I did some changes like adding a custom class. but no effect on the landing page.
can someone explain me how can I fully customize greenlight directly on the server ?
Its for Greenlight V1.
After searching bit i found below steps to setup ruby on rails greenlight app on server.
If you already setup greenlight with docker then please stop docker.
for docker compose you need to run command docker-compose down. it will stop docker image and you will see 404 on your server .
You need to fork greenlight from github first then clone that project in server you can clone it anywhere on server just make sure your server is running on port 5000.
you can checkout more from here
This are all the commands I used to have greenlight running without docker which works for me
======================
apt-get install curl
sudo apt-get install gnupg2
curl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --import -
sudo gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | sudo bash -s stable
source /etc/profile.d/rvm.sh
rvm requirements
rvm list known
rvm install 2.5.1
rvm use 2.5.1 --default
ruby --version
gem install rails
cd /
git clone https://github.com/bigbluebutton/greenlight.git
cd /greenlight
nano Gemfile
(mover dotenv-rails fuera del bloque test/development)
gem install bundler -v 1.16.1
sudo apt-get install libpq-dev
bundle
cp greenlight.nginx /etc/bigbluebutton/nginx/greenlight.nginx
systemctl restart nginx
rake secret
(Copy the secret generated, you will need it for .env)
bbb-conf --secret
(Copy the URL and Secret, you will need it for .env)
cp sample.env .env
nano .env
(fill the Secret and BigBlueButton credentials you generated before)
RAILS_ENV=production rake db:migrate
rails assets:precompile
rails s -p 5000 -e production
=======================================
In this project do changes as you require and run server again.
first of all you must have installed greenlight installed on server
for changing the color of theme :
vim config/application.rb
scroll down and you will found following code just replace code of color with your desire:
# Default primary color if the user does not specify one
config.primary_color_default = "#116ceb"
# Default primary color lighten if the user does not specify one
config.primary_color_lighten_default = "#e8eff9"
# Default primary color darken if the user does not specify one.
config.primary_color_darken_default = "#316cbe"
there is lots of things you can customize..(almost everything).
And one of the most important thing after making changes to any file you must have to rebuild your image of docker you can do that by running the command which is given at the end.
This command is for default settings if you have changed the name of your image please replace bigbluebutton/greenlight release-v2 with yourimage name.
you will find your image name here:
#this will open the yml file for docker settings
vim docker-compose.yml
#file will look like this:
ersion: '3'
services:
app:
entrypoint: [bin/start]
image: bigbluebutton/greenlight:release-v2 #nmae of your image
container_name: greenlight-v2
env_file: .env
restart: unless-stopped
ports:
- 127.0.0.1:5000:80
copy this command and past into the terminal blow command for rebuilding your docker image
docker-compose down && ./scripts/image_build.sh bigbluebutton/greenlight release-v2 && docker-compose up -d
Related
From this instruction it looks like Google allows booting to the sdcard. However, the image they provided (recovery.img) is only an image to boot the board automatically to U-boot, after which you'll still have to flash the MendelOS to eMMC with USB.
I'd like to have the entire OS on the sdcard, that way it's easier to make copy of it and save the state of the OS.
In order to create a MendelOS image that can be flashed in to an sd-card, you'll need to build the image your self. The steps for doing this:
Cloning the Mendel repo's source from here
# Get the repo binary that's necessary to clone Mendel
$ mkdir -p bin
$ export PATH=$PATH:$HOME/bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
# Setup your git env
$ git config --global user.name "Your Name"
$ git config --global user.email "you#example.com"
# clone the repo
$ mkdir mendel && cd mendel
$ repo init -u https://coral.googlesource.com/manifest -b release-day
$ repo sync -j$(nproc)
Make sure that the build system on your host machine meets these requirements:
# System
A 64-bit CPU
Kernel 4.15 or newer
binfmt-support 2.1.7 or newer
# OS
The suggested OSes are: Ubuntu 18.10+ or Debian Buster or newer.
# Install qemu
$ sudo apt-get install qemu-user-static
# Install docker
$ sudo apt-get install docker.io
$ sudo adduser $USER docker
Build:
$ sudo su
$ source build/setup.sh
$ FETCH_PACKAGES=true m docker-sdcard
After the build succeeds, you'll see your sdcard image in the out directory. You can install that to your sdcard using the dd command or some opensrouce tools like Balena Etcher.
Enable boot from the sd-card by switching the boot switch to as described ON OFF ON ON here.
Cheers!
I am trying to deploy a docker configuration with images on a private docker registry.
Now, every time I execute docker login registry.example.com, I get the following error message:
error getting credentials - err: exit status 1, out: Cannot autolaunch D-Bus without X11 $DISPLAY
The only solution I found for non-MacOS users was to run export $(dbus-launch) first, but that did not change anything.
I am running Ubuntu Server and tried with both the Ubuntu Docker package and the Docker-CE package.
How can I log in without an X11 session?
Looks like this is because it defaults to use the secretservice executable which seems to have some sort of X11 dependency for some reason. If you install and configure pass docker will use that instead which seems to solve the problem.
In a nutshell (from https://github.com/docker/compose/issues/6023)
sudo apt install gnupg2 pass
gpg2 --full-generate-key
This generates a you a gpg2 key. After that's done you can list it with
gpg2 -k
Copy the key id (from the line labelled [uid]) and do
pass init "whatever key id you have"
Now docker login should work.
There are a couple of bugs logged on launchpad regarding this:
https://bugs.launchpad.net/ubuntu/+source/golang-github-docker-docker-credential-helpers/+bug/1794307
https://bugs.launchpad.net/ubuntu/+source/docker-compose/+bug/1796119
This works: sudo apt remove golang-docker-credential-helpers
You can remove the offending package golang-docker-credential-helpers without removing all of docker-compose.
The following worked for me on a server without X11 installed:
dpkg -r --ignore-depends=golang-docker-credential-helpers golang-docker-credential-helpers
and then
echo 'foo' | docker login mydockerrepo.com -u dockeruser --password-stdin
Source:
bug reported in debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910823#39
bug reported on ubuntu:
https://bugs.launchpad.net/ubuntu/+source/docker-compose/+bug/1796119
secretservice requires a GUI. You can use pass without a GUI.
Unfortunately, Docker's documentation on how to configure Docker Credential Helpers is quite lacking. Here's a comprehensive guide how to configure pass with Docker (tested with Ubuntu 18.04):
1. Install the Docker Credential Helper for pass
Find the url for the latest version of docker-credential-pass from https://github.com/docker/docker-credential-helpers/releases . For example:
# substitute with the latest version
url=https://github.com/docker/docker-credential-helpers/releases/download/v0.6.2/docker-credential-pass-v0.6.2-amd64.tar.gz
# download and untar the binary
wget $url
tar -xzvf $(basename $url)
# move the binary to a dir in your $PATH
sudo mv docker-credential-pass /usr/local/bin
# verify it works
docker-credential-pass list
2. Install and configure pass
apt install pass
# create a gpg2 key
gpg2 --gen-key
# if you have issues with lack of entropy, "apt install haveged" and try again
# create the password store using the gpg user id above
pass init $gpg_id
3. docker login
docker login
# You should not see any credentials stored in "auths" section.
# "credsStore": "pass" should have been automatically added.
# If the value is "secretservice", replace it with "pass".
cat ~/.docker/config.json
# verify credentials stored in `pass` store now
pass
There is a much easier answer than the ones already posted, which I found in a comment on https://github.com/docker/docker-credential-helpers/issues/105.
The solution is to rename docker-credential-secretservice out of the way
e.g: mv /usr/bin/docker-credential-secretservice /usr/bin/docker-credential-secretservice.broken
Once you do this, docker login works regardless of whether or not docker-compose is installed. No other package additions or removals are necessary.
I've resolved this issue by uninstalling docker-compose which was installed from Ubuntu repo and installing docker-compose by official instruction at https://docs.docker.com/compose/install/#install-compose
What helped me on Ubuntu 18.04 was:
Following the steps in #oberstet 's post and uninstalling the golang helper
Performing a login after the helper uninstall
Reinstalling docker via sudo apt-get install docker
Logging back in via sudo docker login
I'd like to install the following plugin to Kibana running on container.
https://github.com/istresearch/kibana-object-format
However, as I am new to Kibana, I don't know how to install it. Its readme page says I should refer the official guide page below, but it doesn't help me at all. https://www.elastic.co/guide/en/kibana/current/_installing_plugins.html.
The plugin is not listed in the known plugin list. So I guess it should be downloaded from github and install it. But I don't know how.
The images which I am testing now are below.
docker.elastic.co/kibana/kibana:5.6.2
kibana:5.5.2
Any suggestions or comments would be help.
Thanks,
You can download plugins and install in your container if you create a Dockerfile for instance. This will allow you to have an image turning Kibana including the plugin.
Kibana has this command to install plugins: kibana-plugin install
For instance, adding the plugin KNQL could be done this way:
FROM kibana:5.6.6
ENV PATH /usr/share/kibana/bin:$PATH
# Documentation https://www.elastic.co/blog/elasticsearch-docker-plugin-management
RUN kibana-plugin install \
"https://github.com/ppadovani/KibanaNestedSupportPlugin/releases/download/5.6.6-1.0.2/nested-fields-support-5.6.6-1.0.2.zip"
# curl and jq are used for the healthcheck
RUN apt-get update && apt-get install -y curl jq
HEALTHCHECK --interval=1s \
--retries=600 \
CMD curl -f http://localhost:5601/api/status | jq '. | .status.overall.state' | grep -q green
As you can see I've added a Healtcheck at the end, check the documentation to learn more about this.
I'm working on a brand new Rails 5 app, and I can't launch Capybara-Webkit. I'm following these indications.
My development process includes Docker-Compose, then CircleCI for building the Docker image and sending it to Google Cloud Registry.
The $ bundle install is fine, the $ docker build is done, but I can't even launch a spec locally with Webkit.
When I launch this command, it hangs out and freeze:
$ docker-compose run web xvfb-run -a bundle exec rspec
I can't find any many informations about the xvfb-run command, I'm assuming it's a launcher packaged in xvfb...
Here is my Dockerfile:
FROM ruby:2.4.1
RUN apt-get update -qq && apt-get install -y \
build-essential \
libpq-dev \
nodejs \
xvfb \
qt5-default \
libqt5webkit5-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-tools \
gstreamer1.0-x
RUN mkdir /app_dir
WORKDIR /app_dir
ADD Gemfile* /app_dir/
RUN bundle install
COPY . .
Edit 07/08/2017
I think I got misleaded by my dev environment. When I try to launch my spec with guard instead of directly with the rspec, I get another error:
Capybara::Webkit::ConnectionError:
/usr/local/bundle/gems/capybara-webkit-1.14.0/bin/webkit_server failed to start.
This doesnt help me much. This Github issue makes me believe that I need to do something with xvfb.
I tried to launch webkit_server directly from the gem bin folder, and I got the following error:
QXcbConnection: Could not connect to display
Aborted
Edit #2 07/08/2017
I found a way to launch my test suite. If I first launch a bash terminal in my docker compose system, I can then use xvfb without problem.
$ docker-compose run web bash
then
$ xvfb-run -a bundle exec rspec spec
And everything work as expected. The initial problem remains: when I launch this command:
$ docker-compose run web xvfb-run -a bundle exec rspec
It stay on hold and never launch any spec. I'm looking into docker-compose configuration, I must have missed something.
Weird stuff: when I launch my specs via guard it's working... I have no idea why.
Edit #3 08/08/2017
I ended up writing an issue in Capybara-Webkit repo.
I am seeing a build failure on travis-ci, which I cannot reproduce on my local machine. Are there instructions somewhere for setting up a VM that is identical to the travis-ci linux build environment? I'm glad to have travis-ci already reveal a new bug, but less excited to debug it by sending in commits that add debug code.
For container-based builds, there are now instructions on how to setup a docker image locally.
Unfortunately, quite a few steps are still manual. Here are the commands you need to get it up and running:
# change the image according to the language chosen in .travis.yml
$ docker run -it -u travis quay.io/travisci/travis-jvm /bin/bash
# now that you are in the docker image, switch to the travis user
sudo su - travis
# Install a recent ruby (default is 1.9.3)
rvm install 2.3.0
rvm use 2.3.0
# Install travis-build to generate a .sh out of .travis.yml
cd builds
git clone https://github.com/travis-ci/travis-build.git
cd travis-build
gem install travis
travis # to create ~/.travis
ln -s `pwd` ~/.travis/travis-build
bundle install
# Create project dir, assuming your project is `me/project` on GitHub
cd ~/builds
mkdir me
cd me
git clone https://github.com/me/project.git
cd project
# change to the branch or commit you want to investigate
travis compile > ci.sh
# You most likely will need to edit ci.sh as it ignores matrix and env
bash ci.sh
You can use Travis Build which is a library (which means you've to place it in ~/.travis/) to generate a shell based build script (travis compile) which can be then uploaded to the VMs using SSH and executed.
Below steps are just guidance in order to get you into the right track (if anything is missing, let me know).
Docker
Example command to run container (which can be found at Docker Hub):
docker run -it travisci/ubuntu-ruby:18.04 /bin/bash
Run your container, clone your repository then test it manually.
See: Running a Container Based Docker Image Locally
SSH access
Check out this answer. Basically you need to setup bounce host, then configure your build to run SSH tunnel.
Here is the example .travis.yml:
sudo: required
dist: trusty
language: python
python: "2.7"
script:
- echo travis:$sshpassword | sudo chpasswd
- sudo sed -i 's/ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/' /etc/ssh/sshd_config
- sudo service ssh restart
- sudo apt-get install sshpass
- sshpass -p $sshpassword ssh -R 9999:localhost:22 -o StrictHostKeyChecking=no travisci#$bouncehostip
Local setup
Here are the steps to test it on your local environment:
cd ~
git clone https://github.com/travis-ci/travis-build.git
ln -s ~/travis-build/ ~/.travis/travis-build
sudo gem install bundler
bundle install --gemfile ~/.travis/travis-build/Gemfile
cd repo-dir/
travis login -g <github_token>
vim .travis.yaml
travis lint # to validate script
travis compile # to transform into shell script
Vagrant/VM
After you did travis compile which would produce the bash script as result of your .travis.yml, you can use use vagrant to run this script into virtualized environment using provided Vagrantfile and the following steps:
vagrant up
vagrant ssh
cd /vagrant
bundle exec rspec spec
You probably need to install more tools in order to test it.
Here is some git hint which avoids you to generates unnecessary commits when doing trial & errors commits for Travis CI testing:
Fork the repo (or use separate branch).
After initial commit, keep adding --amend to replace your previous commit:
git commit --amend -m 'Same message.' -a
Push the amended commit by force (e.g. into already opened PR):
git push fork -f
Now Travis CI would re-check the same commit over and over again.
See also: How to run travis-ci locally.
I'm facing the same issue right now. I used to use CircleCI before, where you could just login to VM via ssh, but this doesn't work with Travis-CI VMs.
I was able to debug it (to a certain point) by setting up Travis-ci VM clone via Travis-Cookbooks. You would need to install VirtualBox and Vagrant on your computer first before cloning this repository.
Once you have Travis-Cookbooks cloned, open the folder, launch command prompt|terminal and type vagrant up. Once Vagrant finishes setting up VM (may take a long time) on your machine, you can connect to it via ssh by running vagrant ssh.
From there, you would need to clone your own repository (or just copy the code to VM) and apply the steps from your .travis.yml file.
Eregon's answer failed for me at travis compile, there error looks like:
/home/travis/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- travis/support (LoadError)
I got it working with the following adjustments: (Adjustments marked with # CHANGED. I'm using the node environment)
# change the image according to the language chosen in .travis.yml
# Find images at https://quay.io/organization/travisci
docker run -it quay.io/travisci/travis-node-js /bin/bash
# now that you are in the docker image, switch to the travis user
su travis
# Install a recent ruby (default is 1.9.3) to make bundle install work
rvm install 2.3.0
rvm use 2.3.0
# Install travis-build to generate a .sh out of .travis.yml
sudo mkdir builds # CHANGED
cd builds
sudo git clone https://github.com/travis-ci/travis-build.git
cd travis-build
gem install travis
travis # to create ~/.travis
ln -s `pwd` ~/.travis/travis-build
bundle install
bundler add travis # CHANGED
sudo mkdir bin # CHANGED
sudo chmod a+w bin/ # CHANGED
bundler binstubs travis # CHANGED
# Create project dir, assuming your project is `me/project` on GitHub
cd ~/builds
mkdir me
cd me
git clone https://github.com/me/project.git
cd project
# change to the branch or commit you want to investigate
~/.travis/travis-build/bin/travis compile > ci.sh # CHANGED
# You most likely will need to edit ci.sh as it ignores matrix and env
# In particular I needed to edit --branch=’’ to the branch name
bash ci.sh