Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] Instructions to build che with php plugin

Indeed, that env  wasn't working. There were some warning messages when running Che but I didn't know what it was. Thank you for pointing that out.
The info in the link to the update doc and the new utilities seem and sound great.


2015-09-07 13:44 GMT-06:00 Tyler Jewell <tyler@xxxxxxxxxxx>:
**that** is ridiculously cool. 

A couple things:
1. I see you are using the CODENVY_LOCAL_CONF_DIR environment variable.  I believe that in 3.12.x, this has been changed to CHE_LOCAL_CONF_DIR.  Did that variable not work?
2. I spent some time rewriting our docs.  We now have this page, which should help.
3. We are currently working on some utilities (CLI & UI) that will make it easy to discover, add, remove plug-ins for end users.  We'll abstract away the effort of managing dependencies.

Tyler Jewell | CEO | tyler@​codenvy.​com | 9​78​.8​84​.53​55


On Mon, Sep 7, 2015 at 9:56 AM, Job Cespedes <jobcespedes@xxxxxxxxx> wrote:

Hi Tyler:

I followed the instructions and built Che with the php plugin. I also modified the Dockerfile to do it while generating the image using Che git repos. Tha process takes more time, though. It's probably a better idea to built Che outside the container and then download it as with the Dockerfile from github.

Here it is the modified Dockerfile to build Che with one plugin (php) in case anyone find it of any use:


FROM codenvy/shellinabox

ENV CHE_VERSION="3.12.2" \
    MAVEN_VERSION=3.2.2 \
    JAVA_VERSION=8u45 \
    JAVA_VERSION_PREFIX=1.8.0_45 \
    CODENVY_LOCAL_CONF_DIR=/home/user/.codenvy

ENV JAVA_HOME=/opt/jdk$JAVA_VERSION_PREFIX \
    M2_HOME=/opt/apache-maven-$MAVEN_VERSION

ENV PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH

RUN sudo sed -i "s@http://http.debian.net@http://mirrors.ucr.ac.cr@" /etc/apt/sources.list && \
    sudo apt-get update && sudo apt-get install -y -q git subversion && \
    sudo apt-get clean all && \
    git clone -b $CHE_VERSION https://github.com/codenvy/che.git /home/user/repo  && \
    wget \
    --no-cookies \
    --no-check-certificate \
    --header "Cookie: oraclelicense=accept-securebackup-cookie" \
    -qO- \
    "http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION-b14/jdk-$JAVA_VERSION-linux-x64.tar.gz" | sudo tar -zx -C /opt/ && \
    echo "export JAVA_HOME=$JAVA_HOME" >> /home/user/.bashrc && \
    mkdir /opt/apache-maven-$MAVEN_VERSION/ && \
    sudo wget -qO- "https://archive.apache.org/dist/maven/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz" | sudo tar -zx --strip-components=1 -C /opt/apache-maven-$MAVEN_VERSION/ && \
    echo "export M2_HOME=$M2_HOME" >> /home/user/.bashrc && \
    mkdir -p /home/user/.codenvy && \
    echo "export PATH=$PATH" >> /home/user/.bashrc && \
    cd /home/user/.codenvy && \
    touch preference.json profile.json vfs && \
    echo "1q2w3e=/home/user/che/temp/fs-root" >> vfs && \
    echo "export CODENVY_LOCAL_CONF_DIR=$CODENVY_LOCAL_CONF_DIR" >> /home/user/.bashrc && \
    cd /home/user/repo && \
    sed -i "0,/.*<dependency>.*/s@@        <dependency>\n\
            <groupId>org.eclipse.che.plugin</groupId>\n\
            <artifactId>che-plugin-php-ext-php</artifactId>\n\
            <version>\${che.plugins.version}</version>\n\
        </dependency>\n&@" /home/user/repo/assembly-sdk-war/pom.xml && \
    sed -i "0,/.*<\/module>.*/s@@    <inherits name=\"org.eclipse.che.ide.ext.php.PHP\"/>\n&@" \
    /home/user/repo/assembly-sdk-war/src/main/resources/org/eclipse/che/ide/IDE.gwt.xml && \
    mvn sortpom:sort && \
    mvn clean install
&& \
    cp -r /home/user/repo/assembly-sdk/target/assembly-sdk-$CHE_VERSION/assembly-sdk-$CHE_VERSION/ /home/user/che && \
    sudo rm -rf /home/user/.m2/repository/* && \
    sudo rm -rf /home/user/repo && \
    sudo chmod 757 -R /home/user/che && \
    sudo chmod 757 -R /home/user/.codenvy

ADD che.properties /home/user/.codenvy/che.properties
WORKDIR /home/user/che/bin

# expose 8080 port and a range of ports for runners
EXPOSE 8080 49152-49162
CMD ./che.sh run


Thank you =),



2015-09-06 15:22 GMT-06:00 Tyler Jewell <tyler@xxxxxxxxxxx>:
Hi Job:

To add a plug-in to Che, you need to have the plugin & then add it to the Che assembly.

Get the PHP Plugin

There are two ways to get this:
1. Build it directly, or:
2. Reference from Codenvy's central nexus

To build directly:
2. mvn clean install.
3. This will build the JARs of all plugins and install them into your local maven repo.

Add Plugin to Che
You have to update a couple descriptor files and then tell Che to repackage itself.  This is documented here.

1. Add plugin as dependency: Navigate to /che/assembly-sdk-war/ and open pom.xml. You will need to add your plug-in as a dependency.

<dependency>
           <groupId>org.eclipse.che.plugin</groupId>
           <artifactId>che-plugin-php-ext-php</artifactId>
           <version>${che.plugins.version}</version>
</dependency>

2. Add plugin as IDE dependency: Navigate to /che/assembly-sdk-war/src/main/resources/com/codenvy/ide and open IDE.gwt.xml. 

<inherits name="org.eclipse.che.ide.ext.php.PHP"/>

3. Rebuild Che.  assembly-sdk/target/tomcat-ide/extInstall. This command will rebuild Che with the new dependencies.

4. Start Che. Start Che normally.

Let us know how it goes.

Tyler Jewell | CEO | tyler@​codenvy.​com | 9​78​.8​84​.53​55


On Sun, Sep 6, 2015 at 1:34 PM, Job Cespedes <jobcespedes@xxxxxxxxx> wrote:
Hi,

I've been playing around with che and the docker installation. Can someone provide further instrucction on how to build che with aditional plugins, like php, (from che-plugins github repo)?

Thanks.

--
Job Céspedes

_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev



_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev




--
Job Céspedes

_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev



_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev




--
Job Céspedes

Back to the top