Code Monkey home page Code Monkey logo

visa-image-template-example's People

Contributors

atlas974 avatar dvolk avatar stuartcaunt avatar

Watchers

 avatar  avatar

Forkers

dvolk

visa-image-template-example's Issues

Folder `templates/visa-base/http` missing?

Hello,

I'm trying to reproduce the example image from the repo but it seems that the templates/visa-base/http folder is missing, which makes the build fail.
Is this an omission or should I add it myself?

Here is the error below. I have attached a file containing the complete log: visa-base_build.log.

Thank you.

Building image for visa-base:
...
==> qemu: Error finding "/opt/visa-image-template/templates/visa-base/http": stat /opt/visa-image-template/templates/visa-base/http: no such file or directory
2022/01/20 10:10:07 packer-builder-qemu plugin: stdout: Image resized.
2022/01/20 10:10:07 packer-builder-qemu plugin: stderr:
==> qemu: Deleting output directory...
2022/01/20 10:10:08 [INFO] (telemetry) ending qemu
==> Wait completed after 6 seconds 525 milliseconds
Build 'qemu' errored after 6 seconds 525 milliseconds: Error finding "/opt/visa-image-template/templates/visa-base/http": stat /opt/visa-image-template/templates/visa-base/http: no such file or directory
2022/01/20 10:10:08 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2022/01/20 10:10:08 machine readable: qemu,error []string{"Error finding \"/opt/visa-image-template/templates/visa-base/http\": stat /opt/visa-image-template/templates/visa-base/http: no such file or directory"}
==> Builds finished but no artifacts were created.
2022/01/20 10:10:08 [INFO] (telemetry) Finalizing.

==> Wait completed after 6 seconds 525 milliseconds

==> Some builds didn't complete successfully and had errors:
--> qemu: Error finding "/opt/visa-image-template/templates/visa-base/http": stat /opt/visa-image-template/templates/visa-base/http: no such file or directory

==> Builds finished but no artifacts were created.
...

Preseed setting `mirror/http/proxy` is not set correctly when using environment variables for `build-image.sh`.

When using the script build-image.sh without any options but with environment variables, the preseed setting mirror/http/proxy is not set correctly causing the build of the system-base image to fail (the Ubuntu archive mirror can't be reached).

When the option --http-proxy <URL> is used to set the HTTP proxy URL, the script sets the variable PACKER_HTTP_PROXY (build-image.sh:32: PACKER_HTTP_PROXY="$2"); whereas when using the VISA_HTTP_PROXY environment variable, PACKER_HTTP_PROXY is set to "\"\"" (build-image.sh:15:PACKER_HTTP_PROXY="\"\"").

The variable PACKER_HTTP_PROXY is then used to define the {http_proxy} setting in the file templates/system-base/environment.yml.tlt (build-image.sh:66:sed -e "s|{http_proxy}|$PACKER_HTTP_PROXY|g" -e "s|{no_proxy}|$PACKER_NO_PROXY_HOSTS|g" templates/system-base/environment.yml.tlt > templates/system-base/environment.yml) :

environment:
  proxy: {http_proxy}
  no_proxy: {no_proxy}
  cpus: 1
  memory: 4096
  disk_size: 10000
  ubuntu_mirror: http://archive.ubuntu.com/ubuntu/dists
  ubuntu_codename: bionic
  ubuntu_docker_image: ubuntu:18.04
  preseed_file_name: preseed-system-base.cfg
  ssh_username: root
templates/system-base/environment.yml.tlt (END)

The proxy environment variable then defines the preseed setting mirror/http/proxy : templates/system-base/manifest.yml:33: - "mirror/http/proxy={{ proxy }} "

I don't know if this is the expected behavior, but I think it might be worthwhile to specify in the documentation that using the VISA_HTTP_PROXY and VISA_NO_PROXY_HOSTS environment variables does not completely replace the --http-proxy <URL> and --no-proxy <no proxy hosts> options in the build-image.sh script.

Image fails to build

Error while installing lmfit dependency for nexpy

2022/09/28 09:51:10 packer-builder-qemu plugin: [DEBUG] Opening new ssh session                                                                            
2022/09/28 09:51:10 packer-builder-qemu plugin: [DEBUG] starting remote command: chmod +x /tmp/script_2378.sh; PACKER_BUILDER_TYPE='qemu' PACKER_BUILD_NAME
='qemu' PACKER_HTTP_ADDR='10.0.2.2:8488' PACKER_HTTP_IP='10.0.2.2' PACKER_HTTP_PORT='8488'  /tmp/script_2378.sh                                            
    qemu: Collecting nexpy                                                                                                                                 
    qemu:   Downloading https://files.pythonhosted.org/packages/c6/66/95d2fde6877d5abfcc846082faab557009992010e15255bd660a433b5cc2/NeXpy-0.13.3-py3-none-an
y.whl (658kB)                                                                
    qemu: Requirement already satisfied: scipy in /usr/lib/python3/dist-packages (from nexpy)                                                              
    qemu: Requirement already satisfied: ipython in /usr/lib/python3/dist-packages (from nexpy)                                                            
    qemu: Collecting nexusformat>=0.6.1 (from nexpy)                                                                                                       
    qemu:   Downloading https://files.pythonhosted.org/packages/5f/8f/652b07d0302ea6ece79658e4fb9fd2aa3006631d03a5e52db08a4501d72d/nexusformat-0.7.7-py3-no
ne-any.whl (80kB)                                                                                                                                          
    qemu: Requirement already satisfied: matplotlib in /usr/lib/python3/dist-packages (from nexpy)                                                         
    qemu: Collecting lmfit>=1.0.2 (from nexpy)                                                                                                             
    qemu:   Downloading https://files.pythonhosted.org/packages/8c/2f/8af90d45e585692eca1922c53e239c7aa97a904d9254df5b08f2f32520ac/lmfit-1.0.3.tar.gz (292k
B)                                                                                                                                                         
    qemu:     Complete output from command python setup.py egg_info:                                                                                       
    qemu:     Traceback (most recent call last):                         
    qemu:       File "<string>", line 1, in <module>                     
    qemu:       File "/tmp/pip-build-chkg1dl0/lmfit/setup.py", line 55, in <module>                                                                        
    qemu:         packages=['lmfit'],                                                                                                                      
    qemu:       File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup                                                           
    qemu:         return distutils.core.setup(**attrs)                                                                                                     
    qemu:       File "/usr/lib/python3.6/distutils/core.py", line 108, in setup                                                                            
    qemu:         _setup_distribution = dist = klass(attrs)                                                                                                
    qemu:       File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 372, in __init__                                                            
    qemu:         _Distribution.__init__(self, attrs)              
    qemu:       File "/usr/lib/python3.6/distutils/dist.py", line 281, in __init__                                                                         
    qemu:         self.finalize_options()                                                                                                                  
    qemu:       File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 528, in finalize_options                                                    
    qemu:         ep.load()(self, ep.name, value)                                                                                                          
    qemu:       File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2324, in load                                                        
    qemu:         return self.resolve()                                                                                                                    
    qemu:       File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2330, in resolve                                                     
    qemu:         module = __import__(self.module_name, fromlist=['__name__'], level=0)                                                                    
    qemu:       File "/tmp/pip-build-chkg1dl0/lmfit/.eggs/setuptools_scm-7.0.5-py3.6.egg/setuptools_scm/__init__.py", line 5                               
    qemu:         from __future__ import annotations                                                                                                       
==> qemu: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-chkg1dl0/lmfit/                                                    
    qemu:         ^                                                                                                                                        
    qemu:     SyntaxError: future feature annotations is not defined                                                                                       
    qemu:                                                                                                                                                  
    qemu:     ----------------------------------------                    
2022/09/28 09:51:15 packer-builder-qemu plugin: [ERROR] Remote command exited with '1': chmod +x /tmp/script_2378.sh; PACKER_BUILDER_TYPE='qemu' PACKER_BUI
LD_NAME='qemu' PACKER_HTTP_ADDR='10.0.2.2:8488' PACKER_HTTP_IP='10.0.2.2' PACKER_HTTP_PORT='8488'  /tmp/script_2378.sh

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.