Giter Club home page Giter Club logo

diaspora-replica's People

Contributors

cmrd-senya avatar joebew42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

diaspora-replica's Issues

Error: Could not find default node or by name with 'development' on node development

Hi,
On creating development environment I met error "Error: Could not find default node or by name with 'development' on node development". Can you please tell me which config file I should change to fix it?

Here is full output:

kirill@kirill-All-Series ~/Projects/diaspora-replica $ vagrant up development
Bringing machine 'development' up with 'virtualbox' provider...
[development] Importing base box 'ubuntu_server_1404_x64'...
[development] Matching MAC address for NAT networking...
[development] Setting the name of the VM...
[development] Clearing any previously set forwarded ports...
[development] Clearing any previously set network interfaces...
[development] Preparing network interfaces based on configuration...
[development] Forwarding ports...
[development] -- 22 => 2222 (adapter 1)
[development] Running 'pre-boot' VM customizations...
[development] Booting VM...
[development] Waiting for machine to boot. This may take a few minutes...
[development] Machine booted and ready!
[development] Setting hostname...
[development] Configuring and enabling network interfaces...
[development] Mounting shared folders...
[development] -- /vagrant
[development] -- /home/vagrant/diaspora_src
[development] -- /tmp/vagrant-puppet-1/manifests
[development] -- /tmp/vagrant-puppet-1/modules-0
[development] Running provisioner: shell...
[development] Running: inline script
stdin: is not a tty
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Ign http://archive.ubuntu.com trusty-updates InRelease
Get:2 http://security.ubuntu.com trusty-security Release [63.5 kB]
Hit http://archive.ubuntu.com trusty Release.gpg
Get:3 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://archive.ubuntu.com trusty Release
Get:4 http://archive.ubuntu.com trusty-updates Release [63.5 kB]
Get:5 http://security.ubuntu.com trusty-security/main Sources [80.3 kB]
Get:6 http://security.ubuntu.com trusty-security/universe Sources [21.9 kB]
Get:7 http://security.ubuntu.com trusty-security/main amd64 Packages [267 kB]
Get:8 http://archive.ubuntu.com trusty/main Sources [1,064 kB]
Get:9 http://security.ubuntu.com trusty-security/universe amd64 Packages [101 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:10 http://archive.ubuntu.com trusty/universe Sources [6,399 kB]
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en
Get:11 http://archive.ubuntu.com trusty-updates/main Sources [198 kB]
Get:12 http://archive.ubuntu.com trusty-updates/universe Sources [114 kB]
Get:13 http://archive.ubuntu.com trusty-updates/main amd64 Packages [514 kB]
Get:14 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [276 kB]
Get:15 http://archive.ubuntu.com trusty-updates/main Translation-en [243 kB]
Get:16 http://archive.ubuntu.com trusty-updates/universe Translation-en [143 kB]
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/universe Translation-en_US
Fetched 9,550 kB in 12s (747 kB/s)
Reading package lists...
[development] Running provisioner: puppet...
Running Puppet with site.pp...
stdin: is not a tty
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/concat/lib/facter/concat_basedir.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/rvm/lib/facter/rvm_installed.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/rvm/lib/facter/rvm_version.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/stdlib/lib/facter/root_home.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/firewall/lib/facter/iptables_persistent_version.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/firewall/lib/facter/iptables_version.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/firewall/lib/facter/ip6tables_version.rb
Warning: Could not retrieve fact fqdn
Warning: Host is missing hostname and/or domain: development
Warning: Host is missing hostname and/or domain: development
Error: Could not find default node or by name with 'development' on node development
Error: Could not find default node or by name with 'development' on node development
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

puppet apply --verbose --modulepath '/tmp/vagrant-puppet-1/modules-0' --manifestdir /tmp/vagrant-puppet-1/manifests --detailed-exitcodes /tmp/vagrant-puppet-1/manifests/site.pp || [ $? -eq 2 ]

Stdout from the command:

Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/concat/lib/facter/concat_basedir.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/rvm/lib/facter/rvm_installed.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/rvm/lib/facter/rvm_version.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/stdlib/lib/facter/root_home.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/firewall/lib/facter/iptables_persistent_version.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/firewall/lib/facter/iptables_version.rb
Info: Loading facts in /tmp/vagrant-puppet-1/modules-0/firewall/lib/facter/ip6tables_version.rb


Stderr from the command:

stdin: is not a tty
Warning: Could not retrieve fact fqdn
Warning: Host is missing hostname and/or domain: development
Warning: Host is missing hostname and/or domain: development
Error: Could not find default node or by name with 'development' on node development
Error: Could not find default node or by name with 'development' on node development

install gem rugged

During bundle install had next error:

Installing rugged 0.22.2 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150802-6747-1qxtul5.rb extconf.rb
checking for gmake... no
checking for make... yes
checking for cmake... no
ERROR: CMake is required to build Rugged.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/local/rvm/rubies/ruby-2.2.1/bin/$(RUBY_BASE_NAME)
    --use-system-libraries

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.2.1@diaspora_dev/gems/rugged-0.22.2 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.2.1@diaspora_dev/extensions/x86_64-linux/2.2.0/rugged-0.22.2/gem_make.out
An error occurred while installing rugged (0.22.2), and Bundler cannot continue.

To fix this:

sudo apt-get install cmake

Maybe we should add this to provisioning process.

Error during provision

During vagrant up development have error:

==> development: Fetched 4,025 kB in 213503982334601d 6h 56min 29s (0 B/s)
==> development: Reading package lists...
==> development: Running provisioner: puppet...
==> development: Running Puppet with site.pp...
==> development: stdin: is not a tty
==> development: Error: Could not parse application options: invalid option: --manifestdir
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Add support to CentOS 7

It would be useful adding support for CentOS 7. Consider to update puppet-diaspora centos dependencies. Some packages are not yet available for CentOS 7, or has been replaced (e.g. nodejs is not available, mysql has been replaced with mariadb or we have to install the mysql-community-server from external repository, etc.)

Enable the XMPP chat based

An update of this repository is needed in order to support the provision and configuration of the XMPP chat, available in the latest version of diaspora.

Why do we link diaspora_src?

We mount the diaspora source code on the host machine by this.

However, what Capistrano deploys in the development stage is still the upstream repository develop branch.

Why not point Capistrano to the local repository? The best approach for the development would be if the current is also pointed on the mounted sources, so any changes in the original repository are reflected immediately. Otherwise, the development stage of the diaspora-replica is not very useful - it can't be easily used for development purposes, since it would require too many manual steps for each change to test.

Improve performance

Today I start diaspora with vagrant and performance was bad. In nginix log lot of time took assets, something like this I saw:

192.168.11.1 - - [02/Aug/2015:13:40:38 -0700] "GET /assets/app/views/aspect_membership_view.js?body=1 HTTP/1.1" 304 0 "http://development.diaspora.local/stream" "Mozilla/5.0 (Mac
intosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12"
192.168.11.1 - - [02/Aug/2015:13:40:38 -0700] "GET /assets/app/views/aspects_list_view.js?body=1 HTTP/1.1" 304 0 "http://development.diaspora.local/stream" "Mozilla/5.0 (Macintos
h; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12"
192.168.11.1 - - [02/Aug/2015:13:40:38 -0700] "GET /assets/app/collections/comments.js?body=1 HTTP/1.1" 304 0 "http://development.diaspora.local/stream" "Mozilla/5.0 (Macintosh;
Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12"
192.168.11.1 - - [02/Aug/2015:13:40:38 -0700] "GET /assets/app/views/comment_view.js?body=1 HTTP/1.1" 304 0 "http://development.diaspora.local/stream" "Mozilla/5.0 (Macintosh; In
tel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12"

And it tale long long time. /steam page loaded maybe 2 minutes.

Then I execute

rake assets:precompile

But it didn't help, maybe it all because of digest that we have near assets.

I also used this great article https://stefanwrobel.com/how-to-make-vagrant-performance-not-suck (increase memory and cpus) but it didn't help.

But then I change nfs to rsync and all works much faster. http://docs.vagrantup.com/v2/synced-folders/rsync.html

I think this case needed to be instigated.

diaspora-replica should install the latest version of ruby by default

For the development box diaspora-replica provisions following ruby versions:

   ruby-2.1.5 [ x86_64 ]
=* ruby-2.2.1 [ x86_64 ]

However, diaspora development branch doesn't work with version less than 2.2.3 anymore. Instead of pointing the full version number it's better to make vagrant provisioner install the latest version of 2.2 instead of the earliest one by default.

See diaspora/diaspora#6836

Support for LXC

I personally find LXC containers more convinient for certain purposes than VirtualBox ones, e.g. for development.

To make diaspora-replica employ LXC is not hard, just a matter of these changes:

diff --git a/Vagrantfile b/Vagrantfile
index aadded2..2008ae7 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -8,7 +8,7 @@ Vagrant.configure("2") do |config|
   end

   # Ubuntu Server 14.04 LTS
-  config.vm.box = "puppetlabs/ubuntu-14.04-64-puppet"
+  config.vm.box = "fgrehm/trusty64-lxc"
   config.vm.provision :shell, inline: "apt-get update -y --fix-missing"

   # Ubuntu Server 12.04 LTS
@@ -30,11 +30,8 @@ Vagrant.configure("2") do |config|

   config.vm.define "development" do |dev|
     dev.vm.hostname = "development.diaspora.local"
-    dev.vm.network :private_network, ip: "192.168.11.2"
-    dev.vm.synced_folder "src/", "/home/vagrant/diaspora_src/", create: true, type: "nfs"
-    dev.vm.provider "virtualbox" do |vb|
-      vb.memory = 2048
-    end
+    dev.vm.synced_folder "src/", "/home/vagrant/diaspora_src/", create: true
+    dev.vm.network :private_network, ip: "192.168.11.2", lxc__bridge_name: "vlxcbr1"
   end

   config.vm.define "production" do |prod|

However, I wonder, if it is possible to write a Vagrant file in a way, so it contain all the required data to properly determine the required configuration depending on the launch options like
vagrant up development --provider=lxc or vagrant up development --provider=virtualbox with virtualbox as a default.

Is LXC support worthy for the diaspora-replica upstream?

Possible fix for readme needed

In chapter "How to set up a Development Environment"

After command: vagrant@development:~$ bundle install --with mysql postgresql I had an error "The program 'bundle' is currently not installed. To run 'bundle' please ask your administrator to install the package 'bundler'". So before this I must execute gem install bundler. Maybe we should add it to readme. And I'm not sure if this is issue or it happened only in my case.

Change filenames for capistrano configurations

Rename the deploy configuration files for Capistrano (capistrano/config/deploy/). For example the actual configurations does not express the branch of the diaspora git repository in the name. The actual are:

  • development
  • production

Here, is not clear which is the branch we are going to deploy in each environment.
I propose to rename them in:

  • develop_on_development
  • master_on_development
  • develop_on_production
  • master_on_production

Now, our intention is expressed explicitly in the file name. develop_on_production means "deploy the branch develop in production environment".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.