CSM trying to set up Vanilla locally.

I've got a client who's trying to set up locally and having a bunch of problems. To get a better understanding of how to set up locally and what it looks like for a client to follow our documentation I'm going to follow our docs and do it myself.

I've created this thread so I can ask questions and not bother a specific resource, and also leave a paper trail so other people can see what this looks like. My hope is that once I can set this up, I'll do this a second time with a seperate user and record the process so we show clients a video of what it looks like to set it up on Mac (Thanks @Adam Charron).

To get things started, I'm following our Local Setup Quickstart.

Comments

  • After installing Docker on my mac, as a part of dockers tutorial it's asking me to Install Git. I didn't Git referenced in our documentation. Is this a mandatory part of the process? Should it be included in the doc? or is it in the doc but referenced differently?

    image.png


  • This is a great idea. I know I struggled/struggle with this.

    One thing to note is it uses/references PHP Storm... which isn't free. (I use Visual Studio Code)

  • And yes, I think you're going to need Git

  • Unknown
    edited May 2020

    I know @Ryan uses VSCode for PHP, but I keep em separate. PHPStorm for PHP, and VSCode for frontend work.

    @Rhys Could you point me to where we have a requirement on PHPStorm though? None of the installation process should require it.

    As I understand all of that is optional, and just for advanced/productivity setup (debugging in the container).

  • @Adam Charron not a requirement. It just references it in the doc Farhan linked.

    I also realise those docs are specifically for our devs setting up. I was thinking of it from the point of view of someone else trying to follow it step-by-step.

  • Unknown
    edited May 2020

    Still on the Prerequisites. Spent a bunch of time installing git, only to then realize that docker would do it for me if I just clicked on the button....

    Trying to install yarn now and I believe I got some problems. I used npm -v to see if if I had npm installed. Looks like I do so I ran npm install -g yarn and got the errors I'm showing below. What have I missed?

    image.png


  • You don't have permission to install it. You need to run the command with higher privileges. Try putting "sudo" before the command:

    sudo npm install -g yarn
    
  • Thanks @Rhys


    Looks like I've been able to install all the prerequisites and am now headed to set up the Vanilla Docker. Guide is here.

    I've gotten and installed Composer. Wondering if maybe this should also be listed as a prerequisite?

    image.png

    The following steps are bit more tricky to follow. Any resource I can use for steps 4 through 7?

  • I guess there are 2 unlisted pre-requisites then.

    1. PHP & Composer
    2. Git

    Now git & PHP should be pre-installed on macs, which is why we don't have it, but we'll have additional support for windows soon, so we should list them.

    As far as following those steps you do it like this.

    # Navigate to the directory of your project
    cd ~/path/to/my-vanilla-project
    

    That whatever folder you made on your computer. Then we're going to clone the repositories using git. You can always find the correct URL for this in github.

    image.png

    If you'd rather use a GUI for git, you can download the Github desktop app. Despite being rather conmfortable with git and the command line, I still prefer using their app for most tasks. It's pretty nice.

    image.png

    Wrap up

    After the repos you should have some directories like this:

    ~/path/to/my-vanilla-project
       - vanilla
         # All the vanilla files.
       - vanilla-docker
         # All the vanilla-docker files
    


  • @Adam Charron

    we'll have additional support for windows soon
    

    Hello! I'd be happy to guinea pig this for you

  • Unknown
    edited May 2020

    Hey All,

    So I believe I was able to run and install composer and docker for vanilla and vanilla-docker over the weekend.

    A couple of notes.

    3. Get Composer and install it.

    I had to get composer and install in my-vanilla-project/vanilla. This is addressed in step 11, but I wasn't able to just run composer install, I ran php composer.phar install .

    15. Run the installer!

    I didn't realize I had to leave the password empty. Which I've done now and below is the fruits of my labour!


    Glad to see I got it up and running. Not sure I have another step left before I can say that I've installed Vanilla Locally.

    image.png


  • I am also curious if it'd be possible to set it up so that composer is downloaded as a part of the process? Looks like they have documentation here to install Composer programatically.

  • Yeah. That's definitely something we could as part of our mac setup script. We could have install composer and node actually (but check first if they are already installed).

  • Plot Twist ~~ I didn't have composer installed.

    To solve the Composer issue I went back to my-vanilla-project/vanilla and ran brew install composer.

    So it turns out all this stuff here didn't work?

    3. Get Composer and install it.

    I had to get composer and install in my-vanilla-project/vanilla. This is addressed in step 11, but I wasn't able to just run composer install, I ran php composer.phar install .


  • I am now trying to install Vanilla CLI, but am seeing errors as well.

    image.png


  • Unknown
    edited May 2020

    The vanilla build command should be ran on the theme/plugin root folder .You should be able to see an addon.json file with the following:

    "build": {
        "process": "v1"
    },
    


  • I must be missing something.

    When I run vanilla build in the keystone directory it says I don't have the command. I guess I'm missing Vanilla.

    image.png


  • Unknown
    edited May 2020

    I make a quick call with Farhan and helped him setup this step of the installation:

    If your composer bin directory is on your path, you can now run the tool with vanilla. If you are having difficulty locating your composer bin directory it is likely located at ~/.composer/vendor/bin

    https://success.vanillaforums.com/kb/articles/241-vanilla-cli-installation

    And his Vanilla CLI is now working as it should :)