Code Monkey home page Code Monkey logo

snippets's Introduction

snippets

Deploy Hook Snippets

Below is a bare-bone example of using a snippet with the required fields - it will execute the Cloud 66 Node snippet as the first thing on all production servers.

production: # Environment
  first_thing: # Hook point
    - snippet: cloud66/node # Hook type
      target: any # Hook fields
      sudo: true # Needed to install a package
      execute: true # Must be set to true for all snippets

snippets's People

Contributors

alomgirhus avatar babakgh avatar dimitrioslisenko avatar foldingbeauty avatar gottfrois avatar khash avatar lvangool avatar mfkp avatar michaelcrobinson avatar samlans avatar tilsammans avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snippets's Issues

Wkhtmltopdf setup issue on Ubuntu 22.04 Jammy

Problem

Hello! Cloud66 has wkhtmltopdf snippet which is broken for Ubuntu 22.04 Jammy. Script tries to install wkhtmltox_0.12.6-1.jammy_amd64.deb package which doesn't exist (was not compiled for Ubuntu 22.04 Jammy)

Due to that fact we are getting the following error during server build:
Screenshot 2024-04-23 at 12 14 35.

Solution

It is needed to change wkhtmltopdf snippet to the following one:

# {{Description: This deploy hook will run the following code snippet to automate the installation of wkhtmltopdf.}}
# download the latest wkhtmltopdf version
curl -sL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.$(lsb_release -cs)_amd64.deb >> /tmp/wkhtmltopdf.deb
# install the wkhtmltopdf package
sudo dpkg -i /tmp/wkhtmltopdf.deb
# install the package dependencies
sudo apt install --fix-broken -y

I can open a PR that will contain this script rework but not sure about backwards compatibility 'cause your customers could probably still use Ubuntu 14 or Ubuntu 16. Probably a solution could be to check (lsb_release -cs) and use direct links for each release to the latest compiled wkhtmltopdf.deb packages instead of the dynamic links.

Another important thing is that https://github.com/wkhtmltopdf/packaging repository was archived. So probably it is needed to simply use sudo apt -y install wkhtmltopdf command to install this package.

Update to PhantomJS v2?

Hello, I'm using the PhantomJS snippet, but it installs the 1.9.0 version.

The latest release of PhantomJS is 2.0.0. I would like to use this on our servers because it's able to deal with SNI based SSL.

How can I get 2.0.0 installed?

NodeJS 0.12

Update your NodeJS version with this recipe :

# Note the new setup script name for Node.js v0.12
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -

# Then install with:
sudo apt-get install -y nodejs

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.