Can anyone recommend a good setup script to deploy to Modulus after passing tests?
Right now I'm using:
nvm install 0.10.28
nvm use 0.10.28
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g" meteor_install_script.sh
./meteor_install_script.sh
export PATH=$PATH:~/.meteor/
meteor --version
Which is basically what I've managed to copy + paste around the interwebz and I have no idea what I'm doing.
Finally my test pipeline is:
meteor --test
The output from CodeShip logs:
I20150515-13:34:16.005(0)? [velocity] mocha is starting a mirror at http://localhost:44995/.
I20150515-13:34:16.006(0)? [velocity] This takes a few minutes the first time.
I20150515-13:34:16.006(0)? [velocity] You can see the mirror logs at: tail -f /home/rof/src/bitbucket.org/atlasshrugs/garden/.meteor/local/log/mocha.log
PASSED mocha : Server initialization => should have a Meteor version defined
As soon as it gets to the client-side tests, it hangs for ever and fails to build.
Any suggestions?
According to the Velocity readme you should use this command: meteor --test --release velocity:METEOR#1.1.0.3_1. I did manage to get it work using the following setup commands:
nvm install 0.10.30
nvm use 0.10.30
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false
/g"meteor_install_script.sh
./meteor_install_script.sh
export PATH=$PATH:~/.meteor/
meteor --version
and this test command (replacing the with the path to the Meteor app directory. In this case sanjo:jasmine is required, but if you use another tester, you might need to add the related package. The velocity:html-reporter package is overkill for this purpose, but it does works, the console reporter should be enough, but I didn't test it):
cd ~/src/bitbucket.org/<path>/ &&
meteor add sanjo:jasmine velocity:html-reporter &&
meteor --test --release velocity:METEOR#1.1.0.3_1
Related
I'm building custom Debian ISO with simple-cdd utility. It worked well till the moment when I attached my own .deb package.
build-simple-cdd --dist stretch --profiles moj --force-root --local-packages /root/iso/deb
build-simple-cdd works properly, because I saw my deb package in tmp directory structure and iso image is created successfully. However debian installation fails
I suspect, that postinst script fails, since it uses systemctl command when it may be unavailable.
#!/bin/sh
set -e
echo $1
if [ "$1" = "configure" ]; then
echo "Configuring privileges..."
chown user:user /usr/bin/Koncentrator
chmod 0755 /usr/bin/Koncentrator
echo "Enabling Koncentrator services..."
systemctl daemon-reload
systemctl enable Xvfb.service
systemctl enable Koncentrator.service
fi
I've added systemd dependency to control file, but it doesn't work.
I made workaround for this issue. simple-cdd allows to prepare post installation script. apt install is called there without problems. Two steps are required to use this solution:
Add deb package to installation disk. This is configured via profile configuration file (moj.conf):
all_extras="$all_extras /root/iso/files/customapackage_0.1.3.deb"
Run apt install in moj.postinst script:
#!/bin/sh
mount /dev/cdrom /media/cdrom
cd /media/cdrom/simple-cdd
apt install ./custompackage_0.1.3.deb
cd /
sync
umount /media/cdrom
If you want to debug your postinst script, you can insert there long sleep:
#!/bin/sh
sleep 10000000
...
And switch terminal (Ctrl+Alt+F1-6) during finish-install phase. Than call chroot /target to switch in-target environemnent
I'm migrating my standard environment app to flexible environment in GAE and facing issues.
app.yaml snippet
runtime: custom
env: flex
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: main.app
Dockerfile
FROM gcr.io/google_appengine/python-compat-multicore
RUN apt-get update -y
RUN apt-get install -y python-pip build-essential libssl-dev libffi-dev python-dev libxml2-dev libxslt1-dev xmlsec1
RUN apt-get install -y curl unzip
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz
RUN mkdir -p /usr/local/gcloud
RUN tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz
RUN /usr/local/gcloud/google-cloud-sdk/install.sh
RUN curl https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.40.zip > /tmp/google_appengine_1.9.40.zip
RUN unzip /tmp/google_appengine_1.9.40.zip -d /usr/local/gae
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin
ENV PATH $PATH:/usr/local/gae/google_appengine/
COPY . /app
WORKDIR /app
ENV MODULE_YAML_PATH app.yaml
RUN pip install -r requirements.txt
issue while running gcloud app deploy(stack trace)
File "/env/local/lib/python2.7/site-packages/google/appengine/ext/vmruntime/vmconfig.py", line 63, in BuildVmAppengineEnvConfig
escaped_appid = appid.replace(':', '_').replace('.', '_')
AttributeError: 'NoneType' object has no attribute 'replace'
Is there anything which I'm missing in dockerfile? What are the other configuration changes which should be done such that there is not much application level code changes. Is it advidsable to use webapp2 in flexible environment
We're working on a better error message, but this is happening because you're trying to use the python-compat-multicore runtime. That runtime is not supported on env:flex, and has been deprecated. We're asking folks to follow this guide to upgrade to runtime:python:
https://cloud.google.com/appengine/docs/flexible/python/migrating
My tests are written in mocha and they work fine when I invoke the tests using practical meteor like so:
meteor test --full-app --driver-package practicalmeteor:mocha --port 4000 --settings test_settings.json
But when I try to use dispatch:mocha-phantomjs, only the server side tests run:
meteor test --once --full-app --driver-package dispatch:mocha-phantomjs --settings test_settings.json
Am I just missing something about the separation of meteor client and server?
I am trying to use Travis for CI so I need to switch my tests over to the command line output rather than browser
From my meteor/versions
dispatch:mocha-phantomjs#0.1.6
dispatch:phantomjs-tests#0.0.5
practicalmeteor:chai#2.1.0_1
practicalmeteor:loglevel#1.2.0_2
practicalmeteor:mocha#2.4.5_3
practicalmeteor:mocha-core#1.0.1
practicalmeteor:sinon#1.14.1_2
I am using the 2.4.5 rc3 of practical meteor because of a bug that appears when dispatch and practical meteor exist in the same package file
Thanks!
I ended up using spacejam/practicalmeteor:mocha-console-runner to get my client tests to run in travis. I am posting my .travis.yml for anyone interested.
sudo: true
language: node_js
before_install:
- npm install -g spacejam
- echo $METEOR_SETTINGS > test_settings.json
# assumes that meteor is not installed
# - curl https://install.meteor.com | /bin/sh
# if meteor has been properly cached
- sudo ln -s $HOME/.meteor/meteor /usr/local/bin/meteor
cache:
directories:
- node_modules
- $HOME/.meteor/
before_script:
- meteor npm install
script:
- spacejam test --full-app --once --driver-package practicalmeteor:mocha-console-runner --settings test_settings.json
I'm trying to configure a CI infrastructure at Codeship. My local meteor --test command works like charm, but I'm getting a weird error at Codeship.
Local:
I20141208-12:29:42.602(2)? Started
I20141208-12:29:42.602(2)? .
I20141208-12:29:42.603(2)?
I20141208-12:29:42.603(2)? 1 spec, 0 failures
I20141208-12:29:42.603(2)? Finished in 0.014 seconds
PASSED jasmine-server-unit : Job => Job should be created with title, description, location and isRemote
Codeship:
=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:
While Building the application:
node_modules/velocity-cli/velocity-cli.js:1:15: Unexpected token ILLEGAL
=> Your application has errors. Waiting for file change.
Setup commands:
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g" meteor_install_script.sh
./meteor_install_script.sh
Test commands:
meteor --test
Ahoy,
velocity-cli needs to be install globally. Could you add the following command to your setup steps before you call the meteor executable?
npm install -g velocity-cli
Disclaimer: I'm working for Codeship
did you try
meteor run --test
command? This is what velocity-cli creators are telling to do now.
I got it working by changing the setup commands from the OP to the following :
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g" meteor_install_script.sh
./meteor_install_script.sh
export PATH=$HOME/.meteor:$PATH
npm install -g velocity-cli
Also, for what it's worth I am using cucumber instead of jasmine and this still applies.
I am trying to install Meteor on the HP14 Chromebook. It is a linx x86_64 chrome os system.
Each time I try to install it I run into errors.
The first time I tried to install it the installer just downloaded the Meteor preengine but never downloaded the tarball or installed the actual meteor application structure.
So, I decided to try as sudo.
sudo curl https://install.meteor.com | /bin/sh
This definitely installed it because you can see it when ls
chronos#localhost ~/projects $ chronos#localhost ~/projects $ ls /home/chronos/user/.meteor/
bash: chronos#localhost: command not found
Now when I try to run meteor --version or meteor create myapp without sudo I get the following error.
````
chronos#localhost ~/projects $ meteor create myapp
'/home/chronos/user/.meteor' exists, but '/home/chronos/user/.meteor/meteor' is not executable.
Remove it and try again.
````
When I try to run sudo meteor --version or sudo meteor create myapp I get this error.
chronos#localhost ~/projects $ sudo meteor create myapp
mkdir: cannot create directory ‘/root/.meteor-install-tmp’: Read-only file system
Any ideas? Thinking I have to make that partition writeable. I made partition 4 writeable.
Put your chrome book into dev mode.
http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices
Boot into dev mode.
ctrl-alt t to crosh
shell
sudo su -
cd /usr/share/vboot/bin/
./make_dev_ssd.sh --remove_rootfs_verification --partitions 4
reboot
After rebooting
sudo su -
mount -o remount,rw /
mount -o remount,exec /mnt/stateful_partition
Write yourself a read/write script
sudo vim /sbin/rw
#!/bin/bash
echo "Making FS Read/Write"
sudo mount -o remount,rw /
sudo mount -o remount,exec /mnt/stateful_partition
sudo mount -i -o remount,exec /home/chronos/user
echo "You should now have full Read/Write access"
exit
Change permissions on script
sudo chmod a+x /sbin/rw
Run to set read/write root
sudo rw
Install Meteor as indicated on www.meteor.com via curl and meteor create works!
Alternatively you can edit the chomeos_startup though that might not be the best idea. It is probably best to have read/write on demand as illustrated above.
cd /sbin sudo
sudo vim chromeos_startup
Go to lines 51 and 58 and remove the noexec options from the mount command.
Down at the bottom of the script, above the note about ureadahead and below the if statement, add in:
mount -o remount,exec /mnt/stateful_partition
#uncomment this to mount root r/w on boot
mount -o remount,rw /
Again, editing chromeos_startup probably isn't the best idea unless you are so lazy you can't type sudo rw.
Enjoy.
This is super easy to fix!!
Just run this (or put it in .bashrc or .zshrc to make it permanent):
sudo mount -i -o remount,exec /home/chronos/user
Based on your question (you are using sudo) I assume you already have Dev Mode enabled, which is required for the above sudo command to work.
ChromeOS mounts the home folder using the noexec option by default, and this command remounts it with exec instead. And boom, Meteor will work just fine after that (and so will a bunch of other programs running out of your home folder).
Original tip: https://github.com/dnschneid/crouton/issues/928