ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Project: Building a Chef 12 Server on DigitalOcean

    IT Discussion
    digitalocean chef chef 12 ubuntu 14.04 linux projects ubuntu opscode devops
    1
    15
    4.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Install command:

      sudo dpkg -i chef-server-core_12.1.2-1_amd64.deb
      
      1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller
        last edited by

        There was a warning in the DO instructions here: This will install the base Chef 12 system onto the server. If you have selected a server with less powerful hardware than the recommended amount, this step may fail.

        But even on this little single core, 1GB RAM Droplet everything appears to have gone smoothly, no errors were generated.

        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller
          last edited by

          I always add a few extra packages of my own:

          sudo apt-get install htop sysstat fail2ban
          
          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller
            last edited by

            Turn on SAR data collection:

            sudo vi /etc/default/sysstat
            

            Set the value of ENABLED to true.

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller
              last edited by

              Because we are creating an instance that is so tiny and tight on resources, it would be smart to set up some swap space right from the beginning to make sure that we are as well situated as possible. This is a pretty standard procedure but DigitalOcean actually has a specific How To made for this specific to Ubuntu 14.04.

              https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

              sudo fallocate -l 3G /swapfile
              sudo chmod 600 /swapfile
              sudo mkswap /swapfile
              sudo swapon /swapfile
              
              1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller
                last edited by

                You will want to make that swap file permanent too:

                echo "/swapfile   none    swap    sw    0   0" >> /etc/fstab
                
                1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller
                  last edited by

                  Next up, reconfiguring chef:

                  sudo chef-server-ctl reconfigure
                  

                  This step takes several minutes to run, so don't be surprised.

                  1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller
                    last edited by

                    Now it is time to create an admin user. Of course, you will need to modify this command for your own purposes.

                    chef-server-ctl user-create USERNAME FIRST_NAME LAST_NAME EMAIL PASSWORD
                    
                    1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller
                      last edited by

                      This last step will output a private key. Make sure to save this before going on to do anything else.

                      1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller
                        last edited by

                        Now to make our first organization, we will make a test one to get started.

                        chef-server-ctl org-create SHORTNAME LONGNAME --association_user USERNAME -f filename
                        

                        That's the format, here is a real command:

                        chef-server-ctl org-create test "Chef Testing NonProd" --association_user scott -f scott.pem
                        
                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post