Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Remote binary #267

Closed
wants to merge 8 commits into from
Closed

Remote binary #267

wants to merge 8 commits into from

Conversation

AndrienkoAleksandr
Copy link
Contributor

What does this PR do?

Add image with remote-plugin-endpoint binary

What issues does this PR fix or reference?

eclipse-che/che#13387

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
@@ -22,6 +22,13 @@ const localModule = ConnectionContainerModule.create(({ bind }) => {
});

export default new ContainerModule(bind => {
try {
// Force nexe to include theia-plugin-ext iside binary
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo iside -> inside


echo "Copying ${base_dir}/../../extensions/eclipse-che-theia-plugin --> ${LOCAL_ASSEMBLY_DIR}/theia-plugin"
mkdir ${LOCAL_ASSEMBLY_DIR}/theia-plugin
cp -r "${base_dir}/../../extensions/eclipse-che-theia-plugin/src/." "${LOCAL_ASSEMBLY_DIR}/theia-plugin/src/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is worth to create another constant which holds ${base_dir}/../../ ? But up to you.

fi \
fi

#invalidate cashe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo on cache

RUN rm -rf /home/workspace/node_modules/@eclipse-che/theia-plugin-ext /home/workspace/node_modules/@eclipse-che/theia-remote
RUN cp -rf /home/workspace/packages/theia-plugin-ext /home/workspace/node_modules/@eclipse-che/theia-plugin-ext

RUN nexe packages/theia-remote/lib/node/plugin-remote.js -t alpine-x64-10.14.2 -o plugin-remote
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that the binary is running on pure alpine image after that ? AFAIK there was still some mandatory libraries required to run on a plain alpine image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... I tested two remote plugins: typescript and my custom with this binary on the pure alpine - they were working... 99ae354#diff-f7eaf7e082319e42b2dfd26a86ca0736R80
Could you elaborate more about mandatory libraries ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alpine image is just alpine:latest or was there some other packages installed?
my attempt was with pkg and not nexe so it might different, it was requiring libstdc++ package
vercel/pkg#555


@injectable()
export class ChePluginApiProvider implements ExtPluginApiProvider {

provideApi(): ExtPluginApi {
console.log('provide che plugin api!!!');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls remove the trace

return {
frontendExtApi: {
initPath: '/che/api/che-api-worker-provider.js',
initFunction: 'initializeApi',
initVariable: 'che_api_provider'
},
backendInitPath: path.join(__dirname, '../plugin/node/che-api-node-provider.js')
backendInitPath: '@eclipse-che/theia-plugin-ext/lib/plugin/node/che-api-node-provider.js'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in theia, we don't have path.join as well anymore ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndrienkoAleksandr
Copy link
Contributor Author

Closed on favour #410

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants