akiradeveloper / akashic-storage

Filey system backed S3-compatible storage in Scala/Akka-Http
Apache License 2.0
22 stars 2 forks source link

Add getting started guide to README #9

Closed kiaking closed 8 years ago

kiaking commented 8 years ago

Add instruction to setup Vagrant environment.

akiradeveloper commented 8 years ago

@kiaking

Thanks. I am basically willing to merge this in. Writing documents in English is really a hard work for me.

But did you try this out? I don't think it work.

Read my blog about this (in Japanese) and fix please

akiradeveloper commented 8 years ago

Btw, I think the 3 steps now should be reduced to 2 steps as your guide does. setup-mc.py should be folded into vagrant up.

akiradeveloper commented 8 years ago

The reason is mc is not found in search path while we are still in vagrant's provisioning script.

do you think this fixes the problem?

+  export PATH=$PATH:/usr/local/bin
+  python setup-mc.py
    sudo /etc/init.d/akashic-storage start
kiaking commented 8 years ago

This was exact steps I took to boot Vagrant and I think it is working. After following these steps, I get this result inside VM.

[vagrant@localhost ~]$ curl http://localhost:10946/admin/user/1
account not found
akiradeveloper commented 8 years ago

sh installer/compile-jar.sh should be, I believe, cd installer; sh compiler.sh; cd -. These two are equivalent?

kiaking commented 8 years ago

The reason is mc is not found in search path while we are still in vagrant's provisioning script.

MC is working perfectly in my Vagrant VM.

[vagrant@localhost ~]$ mc
NAME:
  mc - Minio Client for cloud storage and filesystems.

USAGE:
  mc [FLAGS] COMMAND [COMMAND FLAGS] [ARGUMENTS...]

COMMANDS:
  ls        List files and folders.
  ...

Maybe you should try destroy vagrant once and provision again?

$ vagrant destroy -f
$ vagrant up
akiradeveloper commented 8 years ago
$ sh installer/compile-jar.sh
[info] Loading global plugins from /Users/akira/.sbt/0.13/plugins
[info] Set current project to share (in build file:/Users/akira/share/)
[error] Not a valid command: assembly
[error] Not a valid project ID: assembly
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: assembly
[error] assembly
[error]         ^
cp: target/scala-2.11/akashic-storage-assembly-0.1.0.jar: No such file or directory
akiradeveloper commented 8 years ago

Yes. After you logged in, mc is found. But while you are running in Vagrant's script, it's not.

kiaking commented 8 years ago

Oh yea you are right. We first need to cd into installer folder because compile-jar.sh is doing cd ... I'll fix the doc. It should;

$ cd installer; sh compiler.sh; cd -
akiradeveloper commented 8 years ago

Sorry to puzzle you.

I think I can fold the setup-mc.py into vagrant. So you can send me PR with the 2 steps

akiradeveloper commented 8 years ago

But, the last cd - can be omitted Because it's just documentation.

kiaking commented 8 years ago

Yes. After you logged in, mc is found. But while you are running in Vagrant's script, it's not.

Hm... Strange I've destroyed my VM and did Vagrant up again but in my environment mc does work. I mean nothing returns error. Anyway I'll fix $ cd installer; sh compiler.sh; cd -.

akiradeveloper commented 8 years ago

The reason is clear. You didn't delete installer/akashic-storage.jar

akiradeveloper commented 8 years ago

Delete it and try vagrant up again. Then your server never get up

kiaking commented 8 years ago

Yes but that's because there are no procedure that runs sh compile-jar.sh in Vagrant provisioning script so I need to do it locally before doing vagrant up right? That's the Compile jar file section in README of this PR.

akiradeveloper commented 8 years ago

@kiaking Yes. Because I want to make users from from installing Scala and sbt onto their server.

akiradeveloper commented 8 years ago

But it's ok for me to call compile-jar.sh in the Vagrant's script. If it's beneficial to acquire more users trial.

akiradeveloper commented 8 years ago

Thanks. It's OK for now.

I will come back again to how Vagrantfile should be and fix the document accordingly

kiaking commented 8 years ago

:+1: