artemmkin / infrastructure-as-code-tutorial Goto Github PK
View Code? Open in Web Editor NEWInfrastructure As Code Tutorial. Covers Packer, Terraform, Ansible, Vagrant, Docker, Docker Compose, Kubernetes
License: Apache License 2.0
Infrastructure As Code Tutorial. Covers Packer, Terraform, Ansible, Vagrant, Docker, Docker Compose, Kubernetes
License: Apache License 2.0
Get error below running "sudo apt-get install -y mongodb-org" :
"Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
grub-pc-bin
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 51.8 MB of archives.
After this operation, 215 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
mongodb-org-shell mongodb-org-server mongodb-org-mongos mongodb-org-tools mongodb-org
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
I guess "--allow-unauthenticated" will work but at users own risk.
raddit-user@raddit-instance-3:~/raddit$ /bin/bash -lc 'puma'
Puma starting in single mode...
PID: 19564
/home/raddit-user/raddit/helpers.rb:4: warning: redefining object_id' may cause serious problems /home/raddit-user/raddit/app.rb:18: warning: class variable access from toplevel ! Unable to load application: NameError: uninitialized constant Mongo::Client /home/raddit-user/raddit/app.rb:21:in
block in <top (required)>': uninitialized constant Mongo::Client (NameError)
from /var/lib/gems/2.3.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1466:in configure' from /var/lib/gems/2.3.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1959:in
block (2 levels) in delegate'
from /home/raddit-user/raddit/app.rb:20:in <top (required)>' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from config.ru:1:in
block in
eval' from /var/lib/gems/2.3.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in
new_from_string'load_file' from /var/lib/gems/2.3.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in
parse_file'load_rackup' from /var/lib/gems/2.3.0/gems/puma-5.1.1/lib/puma/configuration.rb:264:in
app'load_and_bind' from /var/lib/gems/2.3.0/gems/puma-5.1.1/lib/puma/single.rb:44:in
run'run' from /var/lib/gems/2.3.0/gems/puma-5.1.1/lib/puma/cli.rb:80:in
run'<top (required)>' from /usr/local/bin/puma:23:in
load'While running through the Manual Operations section I encountered the following error when trying to run bundle install
in the raddit project:
An error occurred while installing tilt (2.0.8), and Bundler cannot continue.
Make sure that `gem install tilt -v '2.0.8' --source 'https://rubygems.org/'` succeeds before
bundling.
running the suggested command gave me this:
Fetching: tilt-2.0.8.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.3.0 directory.
This is after following all the previous instructions, and indeed it also occurs when running the 'Scripts' version of the instructions so it seems to be systemic
In this line:
You can sign up for $300 in free credits, which will be more than sufficient to complete all of the labs in this tutorial.
it is inferred you need funds for the Google Cloud Platform. While you can apply for the free credits, it does not guarantee that it'll be approved. I've tried myself, informing them I wish to learn more about the platform as a new coder and was denied.
I feel that what is needed, such as paid services, should be made a little more clear.
In 02-manual-operations.md the instruction:
glcoud compute instance create
will/may fail with a message to enable "enable Compute Engine API". The error message also gives the fix which is to follow the link and enable the API: https://console.developers.google.com/apis/api/compute.googleapis.com/overview?project=xxxxxxxxxxxx then retry
The current script pulls down the latest version and does not take into account that the Gem file calls for a specific version, and will not compile properly. A tweak to the installation of bundler must be done to get the right version:
replace:
gem install --no-rdoc --no-ri bundler
With:
gem install bundler -v "$(grep -A 1 "BUNDLED WITH" ~/raddit/Gemfile.lock | tail -n 1)"
If I try and run ansible-playbook deploy.yml
It fails with this message
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match
'all'
[WARNING]: Could not match supplied host pattern, ignoring: raddit-app
PLAY [Deploy Raddit App] ***********************************************************************************************
skipping: no hosts matched
PLAY RECAP *************************************************************************************************************
@Artemmkin I am new to IaaC and I am following your tutorial,
Getting this error while installing mongodb :
==> googlecompute: W: GPG error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D68FA50FEA312927
==> googlecompute: W: The repository 'http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release' is not signed.
Could you please guide me please ?
Tutorial assumes Europe. (https://github.com/Artemmkin/infrastructure-as-code-tutorial/blob/master/docs/01-prerequisites.md)
Set a default compute region:
$ gcloud config set compute/region europe-west1
Set a default compute zone:
$ gcloud config set compute/zone europe-west1-b
Recommend pointing student to https://cloud.google.com/compute/docs/regions-zones
In Labs section
Prerequisits
Just a misspelling in the README.
In 04-packer.md, the step "Create custom machine image", I got the error
googlecompute: google: could not find default credentials.
See https://developers.google.com/accounts/docs/application-default-credentials for more information.
After googling, I found this link https://www.packer.io/docs/builders/googlecompute.html and it help me to fix the above error.
Step to fix :
Please let me know if I am missing any step that causes this error.
Thanks
Mark
Get error below running :
raddit-user@raddit-instance-2:~/raddit$ gcloud compute firewall-rules create allow-raddit-tcp-9292 \
> --network default \
> --action allow \
> --direction ingress \
> --rules tcp:9292 \
> --source-ranges 0.0.0.0/0
Creating firewall...failed.
ERROR: (gcloud.compute.firewall-rules.create) Could not fetch resource:
- Insufficient Permission: Request had insufficient authentication scopes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.