question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to instantiate from a template using docker image with cookiecutter

See original GitHub issue

Trying to instantiate a service from a component template using an image with cookiecutter I’m facing the same error reported in #5488.

Expected Behavior

I should continue to be able to create the service starting from a component template.

Current Behavior

Im getting the following error in the Publish phase:

The visibility parameter is valid only when the nebula-preview header is provided.

Possible Solution

Steps to Reproduce

  1. Clone backstage from main branch
  2. Create new application (same behaviour using the original root repo path)
  3. Build docker image for the backend using the Dockerfile provided in contrib folder, adding the installation of cookiecutter:
FROM node:14-buster

WORKDIR /app

RUN cd /tmp && curl -O https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz && \
    tar -xvf Python-3.8.2.tar.xz && \
    cd Python-3.8.2 && \
    ./configure --enable-optimizations && \
    make -j 4 && \
    make altinstall

RUN apt update
RUN apt install -y mkdocs

RUN pip3.8 install mkdocs-techdocs-core

RUN pip3.8 install cookiecutter && \
    apt remove -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev g++ python-pip python-dev && \
    rm -rf /var/cache/apt/* /tmp/Python-3.8.2

COPY yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz

RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"

# Then copy the rest of the backend bundle, along with any other files we might want.
COPY packages/backend/dist/bundle.tar.gz app-config.yaml ./
RUN tar xzf bundle.tar.gz && rm bundle.tar.gz

CMD ["node", "packages/backend", "--config", "app-config.yaml"]
  1. Build docker image for the frontend:
FROM nginx:mainline

RUN apt-get update && apt-get -y install jq && rm -rf /var/lib/apt/lists/*

COPY packages/app/dist /usr/share/nginx/html
COPY docker/default.conf.template /etc/nginx/templates/default.conf.template

COPY docker/inject-config.sh /docker-entrypoint.d/40-inject-config.sh

ENV PORT 80
  1. Register the component template from https://github.com/projectkerberus/gcp-stack-template
  2. Create service from the imported component template, facing the error:

Screenshot 2021-05-05 at 15 01 37

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
banshee86vrcommented, May 5, 2021

I don’t think so because I try to start from scratch cloning the master branch today. The fix #5488 has been merged 8 days ago.

0reactions
banshee86vrcommented, Jul 20, 2021

Thanks @timbonicus, starting from a newer version of backstage it’s working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker-science/cookiecutter-docker-science - GitHub
Cookiecutter Docker Science provides utilities to make working in Docker container simple. This project is a tiny template for machine learning projects ...
Read more >
Deployment with Docker - Cookiecutter Django - Read the Docs
Keep note of how it provides configuration for the following services: django : your application running behind Gunicorn ;. postgres : PostgreSQL database ......
Read more >
Development and Deployment of Cookiecutter-Django via ...
In this post we'll quickly bootstrap a Django Project using Cookiecutter, manage the application environment via Docker, and then deploy the app to...
Read more >
ckaserer/cookiecutter - Docker Image
A command-line utility that creates projects from cookiecutters (project templates)
Read more >
cookiecutter for container images - DEV Community ‍ ‍
Cookiecutter is a command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found